Part Number Hot Search : 
TA480XXF C74VC FMC2A HEF4016B 1N5474 12401 S151MK55 BU401
Product Description
Full Text Search
 

To Download FDC37C665GT Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  FDC37C665GT fdc37c666gt high-performance multi-mode ? ? parallel port super i/o floppy disk controllers features 5 volt operation floppy disk available on parallel port pins 2.88mb super i/o floppy disk controller - licensed cmos 765b floppy disk controller - software and register compatible to the 82077aa using smsc's proprietary floppy disk controller core - supports vertical recording format - 100% ibm? compatibility - detects all overrun and underrun conditions - 48 ma drivers and schmitt trigger inputs - dma enable logic - data rate and drive control registers - swap drives a and b - non-burst mode dma option - fdc primary/secondary address selection - 16 byte data fifo - low power cmos 0.8 m design enhanced digital data separator - low cost implementation - 24 mhz crystal - no filter components required - ease of test and use, lower system cost, and reduced board area - 1 mb/s, 500 kb/s, 300 kb/s, 250 kb/s data rates - supports floppy d isk and tape drives - programmable precompensation modes multi-mode parallel port with chiprotect ? circuitry - standard mode - ibm pc/xt?, pc/at?, and ps/2 ? compatible bidirectional parallel port - enhanced mode - enhanced parallel port (epp) compatible - epp 1.7 and epp 1.9 (ieee 1284 compliant) - high speed mode - microsoft and hewlett packard extended capabilities port (ecp) ieee 1284 compliant - incorporates chiprotect circuitry for protection against damage due to printer power-on - pro vides backdrive current protection - 24 ma output drivers - two parallel port interrupt pins serial ports - two high speed ns16c550 compatible uarts with send/receive 16 byte fifos - midi compatible - programmable baud rate generator - modem control circuitry isa host interface ide interface - on-chip decode and select logic compatible with ibm pc/xt and pc/at embedded hard disk drives - ide primary/secondary address selection
2 ? supports four floppy drives directly (standard and enhanced modes) ? ge neral purpose 11 bit address decoder ? game port select logic (fdc37c666gt only) ? 100 pin qfp package table of contents features ................................ ................................ ................................ ................................ ...... 1 general description ................................ ................................ ................................ ................ 3 pin configuration ................................ ................................ ................................ ...................... 4 description of pin functions ................................ ................................ ................................ 5 functional description ................................ ................................ ................................ ........ 22 super i/o regis ters ................................ ................................ ................................ ........... 22 host processor interface ................................ ................................ ............................ 22 floppy disk controller ................................ ................................ ................................ .. 23 floppy disk controller internal registers ................................ ............................ 23 command set/descriptions ................................ ................................ ................................ .. 46 instruction set ................................ ................................ ................................ ........................ 50 parallel port floppy disk controller ................................ ................................ ............. 76 serial port (uart) ................................ ................................ ................................ .................... 78 parallel port ................................ ................................ ................................ ........................... 92 ibm xt/at c ompatible, bi-directional and epp modes ................................ ............... 94 extended capabilities parallel port ................................ ................................ ........ 100 integrated drive electronics interface ................................ ................................ ..... 113 configuration ................................ ................................ ................................ ......................... 117 operational description ................................ ................................ ................................ ..... 131 maximum guaranteed ratings ................................ ................................ ..................... 131 dc electrical characteristics ................................ ................................ ................. 131 timing diagrams ................................ ................................ ................................ ...................... 134 ecp parallel port timing ................................ ................................ ............................... 147
3 general description the smsc FDC37C665GT and fdc37c666gt advanced high performance multi-mode parallel port super i/o floppy disk controller ics utilize smsc's proven supercell technology for increased product reliability and functionality. the FDC37C665GT is optimized for motherboard applications while the fdc37c666gt is oriented towards controller card applications. both devices support 1 mb/s data rates for vertical recording operation. the FDC37C665GT is hardware compatible with the fdc37c651 and fdc37c661 in the standard and enhanced parallel port modes. the FDC37C665GT and fdc37c666gt incorporate smsc's true cmos 765b floppy disk controller, advanced digital data separator, 16 byte data fifo, two 16c550 compatible uarts, one multi-mode parallel port which includes chiprotect circuitry plus epp and ecp support, ide interface, on-chip 24 ma at bus drivers, game port chip select (fdc37c666gt only), general purpose address decoder and four floppy direct drive support. the true cmos 765b core provides 100% compatibility with ibm pc/xt and pc/at architectures in addition to providing data overflow and underflow protection. the smsc advanced digital data separator incorporates smsc's patented data separator technology, allowing for ease of testing and use. both on-chip uarts are compatible with the ns16c550. the parallel port, the ide interface and the game port select logic are compatible with ibm pc/xt and pc/at architectures, as well as epp and ecp. the FDC37C665GT and fdc37c666gt incorporate sophisticated power control circuitry (pcc). the pcc supports multiple low power down modes. the FDC37C665GT floppy disk controller incorporates software configurable logic (scl) for ease of use. use of the scl feature allows programmable system configuration of key functions such as the fdc, parallel port, and uarts. the parallel port chiprotect prevents damage caused by the printer being powered when the FDC37C665GT or fdc37c666gt is not powered. the parallel port backdrive current protection prevents the FDC37C665GT or fdc37c666gt from sinking current when the device is powered off and the printer is left powered on. the FDC37C665GT and fdc37c666gt do not require any external filter components and are, therefore, easy to use and offer lower system cost and reduced board area. the FDC37C665GT and fdc37c666gt are software and register compatible to the 82077aa using smsc's proprietary floppy disk controller core. ibm, pc/xt and pc/at are registered trademarks and ps/2 is a trademark of international business machines corporation. smsc is a registered trademark and chiprotect, supercell, and multi-mode are trademarks of standard microsystems corporation
4 pin configuration 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 d2 d1 d0 vss aen niow nior a9 a8 a7 fintr pintr irq4 irq3 ndack tc a6 a5 a4 a3 nrts1 ncts1 ndtr1 nri1 ndcd1 nri2 ndcd2 rxd2 txd2 ndsr2 nrts2 ncts2 ndtr2 drv2/adrx/pintr2 vss nmtr2/pdack nds3/a10 nds2/nds3/pdir nmtr3/pdrq iochrdy d 3 f d r q d 4 d 5 d 6 d 7 r e s e t p w r g d s l c t p e b u s y n a c k p d 7 p d 6 p d 5 p d 4 v s s p d 3 p d 2 p d 1 p d 0 v c c n s l c t i n n i n i t n a u t o f d n s t r o b e t x d 1 n d s r 1 n e r r o r FDC37C665GT 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 a 2 a 1 a 0 n i o c s 1 6 n h d c s 1 n h d c s 0 n i d e e n h i n i d e e n l o i d e d 7 x 2 / c l k 2 x 1 / c l k 1 d r a t e 0 / m e d i a _ i d 0 d r a t e 1 / m e d i a _ i d 1 n d s k c h g n r d a t a v c c n w r t p r t n t r k 0 n i n d e x n h d s e l n w g a t e n w d a t a n s t e p n d i r n m t r 1 n d s 0 n d s 1 n m t r 0 v s s d e n s e l 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 31 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 d2 d1 d0 vss aen niow nior a9 a8 a7 fintr pintr pspirq sspirq ndack tc a6 a5 a4 a3 nrts1 ncts1 ndtr1 nri1 ndcd1 nri2 ndcd2 rxd2 txd2 ndsr2 nrts2 ncts2 ndtr2 drv2/adrx/pintr2 vss nmtr2/pdack nds3/a10 nds2/nds3/pdir nmtr3/pdrq iochrdy d 3 f d r q d 4 d 5 d 6 d 7 r e s e t n g a m e c s / p a d c f s l c t p e b u s y n a c k p d 7 p d 6 p d 5 p d 4 v s s p d 3 p d 2 p d 1 p d 0 v c c n s l c t i n n i n i t n a u t o f d n s t r o b e r x d 1 t x d 1 n d s r 1 n e r r o r fdc37c666gt 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 a 2 a 1 a 0 n i o c s 1 6 n h d c s 1 / f a c f n h d c s 0 / i d e a c f n i d e e n h i n i d e e n l o i d e d 7 x 2 / c l k 2 x 1 / c l k 1 d r a t e 0 / m e d i a _ i d 0 d r a t e 1 / m e d i a _ i d 1 n d s k c h g n r d a t a v c c n w r t p r t n t r k 0 n i n d e x n h d s e l n w g a t e n w d a t a n s t e p n d i r n m t r 1 n d s 0 n d s 1 n m t r 0 v s s d e n s e l 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 60 59 58 57 56 55 54 53 52 51 r x d 1
5 description of pin functions pin no. name sym bol buffer type description host processor interface 48-51 53-56 data bus 0-7 d0-d7 i/o24 the data bus connection used by the host microprocessor to transmit data to and from the fdc37 c665gt. these pins are in a high-impedance state when not in the output mode. 44 ni/o read nior i this active low signal is issued by the host micropro ces sor to indicate a read operation. 45 ni/o write niow i this active low signal is issued by the host micropro ces sor to indicate a write operation. 46 address enable aen i active high address enable indicates dma operations on the host data bus. used internally to qualify appropriate address decodes. 28-34 41-43 i/o address a0-a9 i these host address bits determine the i/o address to be accessed during nior and niow cycles. these bits are latched internally by the leading edge of nior and niow. 52 fdc dma request fdrq o24 this active high output is the dma request for byte trans fers of data to the host. this signal is cleared on the last byte of the data transfer by the ndack signal going low (or by nior going low if ndack was already low as in demand mode). 36 ndma ac kno w le- dge ndack i an active low input acknowledging the request for a dma transfer of data. this input enables the dma read or write internally. 35 ter mi nal count tc i this signal indicates to the FDC37C665GT that data transfer is complete. tc is only accepted when ndack or npdack is low. in at and ps/2 model 30 modes, tc is active high and in ps/2 mode, tc is active low.
6 description of pin functions pin no. name sym bol buffer type description 38 serial port interrupt request primary serial port interrupt irq4 pspirq o24 o24 FDC37C665GT (motherboard application): irq4 is the interrupt from the primary serial port (psp) or secondary serial port (ssp) when the psp or ssp have their address programmed as com1 or com3 (as defined in the configuration registers). the appropriate interrupt from the serial port is enabled/disabled via the interrupt enable register (ier). the interrupt is reset inactive after interrupt service. it is disabled through ier or hardware reset. fdc37c666gt (adapter application): pspirq is a source of psp interrupt. externally, it should be connected to either irq3 or irq4 on pc/at via jumpers. 37 serial port interrupt request secondary serial port interrupt irq3 sspirq o24 o24 FDC37C665GT (motherboard application): irq3 is the interrupt from the primary serial port (psp) or secondary serial port (ssp) when the psp or ssp have their address programmed as com2 or com4 (as defined in the configuration registers). the appropriate interrupt from the serial port is enabled/disabled via the interrupt enable register (ier). the interrupt is reset inactive after interrupt service. it is disabled through ier or hardware reset. fdc37c666gt (adapter application): sspirq is a source of ssp interrupt. externally, it should be connected to either irq3 or irq4 on pc/at via jumpers. 40 floppy controller interrupt request fintr o24 this interrupt from the floppy disk controller is enabled/disabled via bit 3 of the digital output register (dor).
7 description of pin functions pin no. name sym bol buffer type description 39 parallel port interrupt request 1 pintr1 o24 od24 this interrupt from the parallel port is enabled/disabled via bit 4 of the parallel port control register. refer to configuration registers cr1 and cr3 for more information. if epp or ecp mode is enabled, this output is pulsed low, then released to allow sharing of interrupts. 57 reset rst is this active high signal resets the FDC37C665GT and must be valid for 500 ns minimum. the effect on the internal registers is described in the appropriate section. the configuration registers are not affected by this reset. in the fdc37c666gt, the falling edge of reset latches the jumper configuration. the jumper select lines must be valid 50 ns prior to this edge. floppy disk interface 16 nread disk data nrdata is raw serial bit stream from the disk drive, low active. each falling edge represents a flux transi tion of the encod ed data. 10 nwrite gate nwgate od48 this active low high current driver allows current to flow through the write head. it becomes active just prior to writ ing to the diskette. 9 nwrite da ta nwdata od48 this active low high current driver provides the en coded data to the disk drive. each falling edge causes a flux transi tion on the media. 11 nhead se lect nhdsel od48 this high current output selects the floppy disk side for read ing or writing. a logic "1" on this pin means side 0 will be accessed, while a logic "0" means side 1 will be ac- cessed.
8 description of pin functions pin no. name sym bol buffer type description 7 ndi rec tion con trol ndir od48 this high current low active output determines the direction of the head movement. a logic "1" on this pin means outward mo tion, while a logic "0" means inward motion. 8 nstep pulse nstep od48 this active low high current driver issues a low pulse for each track-to-track movement of the head. 17 ndisk change ndskchg is this input senses that the drive door is open or that the diskette has possibly been changed since the last drive selection. this input is inverted and read via bit 7 of i/o address 3f7h. 4,3 ndrive se lect o,1 nds0,1 od48 active low open drain outputs select drives 0-1. refer to note 2. 98 ndrive select 2 ndrive select 3 pdir nds2 nds3 pdir od48 od48 o4 active low open drain output selects drives 2. refer to note 2. in non-ecp mode: active low open drain output selects drive 3. refer to note 2. this bit is used to indicate the direction of the parallel port data bus. 0 = output/write 1 = input/read 97 ndrive select 3 i/o address 10 nds3 a10 0d48 i in non-ecp mode: active low open drain output selects drive 3. refer to note 2. in ecp mode, this pin is the a10 address input. 2,5 nmo tor on 0,1 nmtr0,1 od48 these active low open drain outputs select motor drives 0-1. refer to note 1. 96 nmotor on 2 nmtr2 npdack od48 i motor on 2: refer to note 1. in ecp mode, nmtr2 is the parallel port dma acknowledge input. active low. 99 nmo tor on 3 nmtr3 pdrq od48 o24 motor on 3: refer to note 1. in ecp mode, mtr3 is the parallel port dma request output. active high.
9 description of pin functions pin no. name sym bol buffer type description 1 density select densel od48 indicates whether a low (250/300 kb/s) or high (500 kb/s) data rate has been selected. this is determined by the ident bit in configuration register 3. 14 nwrite pro tect ed nwrtprt is this active low schmitt trigger input senses from the disk drive that a disk is write protected. any write command is ignored. 13 ntrack 00 ntr0 is this active low schmitt trigger input senses from the disk drive that the head is positioned over the outermost track. 12 nin dex nindex is this active low schmitt trigger input senses from the disk drive that the head is positioned over the beginning of a track, as marked by an index hole. 19,18 19,18 data rate 0, data rate 1 media id0, media id1 drate0, drate1 o24 i these two outputs reflect bits 0 and 1 respectively of the data rate register. at power on, these two outputs are in a high impedance state (refer to table 50). in floppy enhanced mode 2 - these bits are the media id 0,1 inputs. the value of these bits can be read as bits 6 and 7 of the floppy tape register. serial port interface 78,88 receive data rxd1, rxd2 i receiver serial data input. 79 transmit data txd1 pcf0 o4 i transmitter serial data output from primary serial port. fdc37c666gt (adapter mode): parallel port configuration control 0. during reset active this input is read and latched to define the address of the parallel port.
10 description of pin functions pin no. name sym bol buffer type description 81 nrequest to send parallel port configuration control nrts1 pcf1 o4 i active low request to send output for primary serial port. handshake output signal notifies modem that the uart is ready to transmit data. this signal can be programmed by writing to bit 1 of modem control register (mcr). the hardware reset will reset the nrts signal to inactive mode (high). forced inactive during loop mode operation. fdc37c666gt (adapter mode): parallel port configuration control 1. during reset active this input is read and latched to define the address of the parallel port. 91 nrequest to send secondary serial port configuration control nrts2 s2cf0 o4 i active low request to send output for secondary serial port. handshake output signal notifies modem that the uart is ready to transmit data. this signal can be programmed by writing to bit 1 of modem control register (mcr). the hardware reset will reset the nrts signal to inactive mode (high). forced inactive during loop mode operation. fdc37c666gt (adapter mode): secondary serial port configuration control 0. during reset active this input is read and latched to define the address of the secondary serial port.
11 description of pin functions pin no. name sym bol buffer type description 83 ndata terminal ready ide configuration control ndtr1 idecf o4 i active low data terminal ready output for primary serial port. handshake output signal notifies modem that the uart is ready to establish data communication link. this signal can be programmed by writing to bit 0 of modem control register (mcr). the hardware reset will reset the ndtr signal to inactive mode (high). forced inactive during loop mode operation. fdc37c666gt (adapter mode): ide configuration control. during reset active this input is read and latched to enable/disable the ide. 93 ndata terminal ready secondary serial port configuration control 1 ndtr2 s2cf1 o4 i active low data terminal ready output for secondary serial port. handshake output signal notifies modem that the uart is ready to establish data communication link. this signal can be programmed by writing to bit 0 of modem control register (mcr), the hardware reset will reset the ndtr signal to inactive mode (high). forced inactive during loop mode operation. fdc37c666gt (adapter mode): secondary serial port configuration control 1. during reset active this input is read and latched to define the address of the secondary serial port. 89 transmit data 2 txd2 fdccf o4 i transmitter serial data output from secondary serial port. fdc37c666gt (adapter mode): floppy disk configuration. this input is read and latched during reset to enable/disable the floppy disk controller.
12 description of pin functions pin no. name sym bol buffer type description 82,92 nclear to send ncts1, ncts2 i active low clear to send inputs for primary and secondary serial ports. handshake signal which notifies the uart that the modem is ready to receive data. the cpu can monitor the status of ncts signal by reading bit 4 of modem status register (msr). a ncts signal state change from low to high after the last msr read will set msr bit 0 to a 1. if bit 3 of interrupt enable register is set, the interrupt is generated when ncts changes state. the ncts signal has no effect on the transmitter. note: bit 4 of msr is the complement of ncts. 80,90 ndata set ready ndsr1, ndsr2 i active low data set ready inputs for primary and secondary serial ports. handshake signal which notifies the uart that the modem is ready to establish the communication link. the cpu can monitor the status of ndsr signal by reading bit 5 of modem status register (msr). a ndsr signal state change from low to high after the last msr read will set msr bit 1 to a 1. if bit 3 of interrupt enable register is set, the interrupt is generated when ndsr changes state. note: bit 5 of msr is the complement of ndsr. 85,87 ndata carrier detect ndcd1, ndcd2 i active low data carrier detect inputs for primary and secondary serial ports. handshake signal which notifies the uart that carrier signal is detected by the modem. the cpu can monitor the status of ndcd signal by reading bit 7 of modem status register (msr). a ndcd signal state change from low to high after the last msr read will set msr bit 3 to a 1. if bit 3 of interrupt enable register is set, the interrupt is generated when ndcd changes state. note: bit 7 of msr is the complement of ndcd.
13 description of pin functions pin no. name sym bol buffer type description 84,86 nring indicator nri1, nri2 i active low ring indicator input for primary and secondary serial ports. handshake signal which notifies the uart that the telephone ring signal is detected by the modem. the cpu can monitor the status of nri signal by reading bit 6 of modem status register (msr). a nri signal state change from low to high after the last msr read will set msr bit 2 to a 1. if bit 3 of interrupt enable register is set, the interrupt is generated when nri changes state. note: bit 6 of msr is the complement of nri. 94 drive 2 nadrx parallel port interrupt request 2 drv2 nadrx pintr2 ecpen i o24 o24 i in ps/2 mode, this input indicates whether a second drive is connected; drv2 should be low if a second drive is connected. this status is reflected in a read of status register a. (only available in FDC37C665GT. this pin must not be driven in the fdc37c666gt) optional i/o port address decode output. refer to configuration registers cr3, cr8 and cr9 for more information. active low. (available in FDC37C665GT and fdc37c666gt.) defaults to tri-state after power-up. this pin has a 30 m a internal pull- up. this interrupt from the parallel port is enabled/disabled via bit 4 of the parallel port control register. refer to configuration registers cr1 and cr3 for more information. fdc37c666gt (adapter mode): enhanced parallel port mode select. refer to fdc37c666gt hardware configuration for more information. read and latched during reset active. parallel port interface
14 description of pin functions pin no. name sym bol buffer type description 73 nprinter select input nslctin od24 this active low output selects the printer. this is the complement of bit 3 of the printer control register. 0p24 refer to parallel port description for use of this pin in ecp and epp mode. 74 ninitiate output ninit od24 this output is bit 2 of the printer control register. this is used to initiate the printer when low. 0p24 refer to parallel port description for use of this pin in ecp and epp mode. 76 nautofeed output nautofd od24 this output goes low to cause the printer to automatically feed one line after each line is printed. the nautofd output is the complement of bit 1 of the printer control register. 0p24 refer to parallel port description for use of this pin in ecp and epp mode. 77 nstrobe output nstrobe od24 an active low pulse on this output is used to strobe the printer data into the printer. the nstrobe output is the complement of bit 0 of the printer control register. 0p24 refer to parallel port description for use of this pin in ecp and epp mode. 61 busy busy i this is a status output from the printer, a high indicating that the printer is not ready to receive new data. bit 7 of the printer status register is the complement of the busy input. refer to parallel port description for use of this pin in ecp and epp mode. 62 nacknowledge nack i a low active output from the printer indicating that it has received the data and is ready to accept new data. bit 6 of the printer status register reads the nack input. refer to parallel port description for use of this pin in ecp and epp mode.
15 description of pin functions pin no. name sym bol buffer type description 60 paper end pe i another status output from the printer, a high indicating that the printer is out of paper. bit 5 of the printer status register reads the pe input. refer to parallel port description for use of this pin in ecp and epp mode. 59 printer selected status slct i this high active output from the printer indicates that it has power on. bit 4 of the printer status register reads the slct input. refer to parallel port description for use of this pin in ecp and epp mode. 75 nerror nerr i a low on this input from the printer indicates that there is a error condition at the printer. bit 3 of the printer status register reads the nerr input. refer to parallel port description for use of this pin in ecp and epp mode. 71-68 66-63 port data pd0 -pd7 i/op24 the bi-directional parallel data bus is used to transfer information between cpu and peripherals. 100 iochrdy iochrdy od24p in epp mode, this pin is pulled low to extend the read/write command. this pin has an internal pull-up. ide 23 nide low byte enable nideenlo s1cf1 o8 i this active low signal is used in both the xt and at mode. in the at mode, this pin is active when the ide is enabled and the i/o address is accessing 1f0h -1f7h and 3f6h -3f7h in primary address mode or 170h-177h and 376h,377h in secondary address mode. in the xt mode, this signal is active for accessing 320h -323h, 8 bit programmed i/o or dma. fdc37c666gt (adapter mode): primary serial configuration 1. read and latched during reset active to select the address of the secondary serial port.
16 description of pin functions pin no. name sym bol buffer type description 24 nide high byte enable nideenhi s1cf0 o8 i this signal is active low only in the at mode, and when io16csb is also active. the i/o addresses for which this pin reacts are 1f0h -1f7h in primary address mode or 170h-177h in secondary address mode. this pin is not used in xt mode. fdc37c666gt (adapter mode): primary serial configuration 0. read and latched during reset active to define the address of the secondary serial port. 25 nhard disk chip select nhdcs0 ideacf o24 i this is the hard disk chip select corresponding to addresses 1f0h -1f7h in primary address mode or 170h-177h in secondary address mode in the at mode and addresses 320h -323h in the xt mode. fdc37c666gt (adapter mode): ide address control. refer to fdc37c666gt hardware configuration for more information. read and latched during reset active. 26 nhard disk chip select nhdcs1 facf o24 i this is the hard disk chip select corresponding to 3f6h,3f7h for primary address mode or 376h,377h for secondary address mode in the at mode and addresses 3f6h,3f7h in the xt mode. fdc37c666gt (adapter mode): floppy disk address control. refer to fdc37c666gt hardware configuration for more information. read and latched during reset active. 27 ni/o 16 bit indicator niocs16 nhdack i i this input indicates, in at mode only, when 16 bit transfers are to take place. this signal is generated by the hard disk interface. logic "0" = 16 bit mode; logic "1" = 8 bit mode. in the xt mode, this is the hard disk controller dma acknowledge, low active.
17 description of pin functions pin no. name sym bol buffer type description 22 ide data bit 7 ided7 i/o24 ide data bit 7 in the at mode. ided7 transfers data at i/o addresses 1f0h-1f7h (r/w), 3f6 (r/w), 3f7(w). ided7 should be connected to ide data bit 7. the FDC37C665GT functions as a buffer transferring data bit 7 between the ide device and the host. during i/o read of 3f7h, ided7 is the fdc disk change bit. in the xt mode, ide7 is not used. miscellaneous 58 power good pwrgd i FDC37C665GT (motherboard mode): this input indicates that the power (v cc ) is valid. for device operation, pwrgd must be active. when pwrgd is inactive, all inputs to the FDC37C665GT are disconnected and put in a low power mode, all outputs are put into high impedance. the contents of all registers are preserved as long as v cc has a valid value. the driver current drain in this mode drops to istby - standby current. this input has a weak pullup resistor to v cc . ngame port chip select ngamecs padcf o4 i fdc37c666gt (adapter mode): this is the game port chip select output - active low. it will go active when the i/o address is 201h. fdc37c666gt (adapter mode): parallel port mode control. refer to fdc37c666gt hardware configuration for more information. read and latched during reset active. 20 clock 1 x1/clk1 iclk the external connection for a parallel resonant 24 mhz crystal. a cmos compatible oscillator is required if crystal is not used. 21 clock 2 x2/clk2 oclk 24 mhz crystal. if an external clock is used, this pin should not be connected. this pin should not be used to drive any other drivers.
18 description of pin functions pin no. name sym bol buffer type description 15,72 power v cc + 5 volt supply pin. 6,47, 67,95 ground gnd ground pin. note 1: these active low open drain outputs select motor driv es 0-3. in non-ecp modes, four drives can be supported directly. these motor enable bits are controlled by software via the digital output register (dor). in ecp mode, mtr0,1 can be used to directly support 2 drives or can support 4 drives by using an external 2 to 4 decoder. note 2: active low open drain outputs select drives 0-3. in non-ecp modes, four drives can be supported directly. these drive select outputs are a decode of bits 0 and 1 of the digital output register and qualified by the appropriate motor enable bit of the dor (bits 4-7). in ecp mode, ds0,1 can be used to directly support 2 drives or can support 4 drives by using an external 2 to 4 decoder.
19 buffer type descriptions buffer type description i/o24 input/output. 24 ma sink; 12 ma source. o24 output. 24 ma sink; 12 ma source. od24 output. 24 ma sink. od24p open drain. 24 ma sink; 30 m a source. op24 output. 24 ma sink; 4 ma source. od48 open drain. 48 ma sink. o4 output. 4 ma sink; 2.0 ma source. o8 output. 8 ma sink; 4.0 ma source. oclk output to external crystal iclk input to crystal oscillator circuit (cmos levels) i input ttl compatible. is input with schmitt trigger
20 figure 1 - FDC37C665GT/fdc37c666gt block diagram ndsr1, ndcd1, nri1, ndtr1 txd1, ncts1, nrts1 ninit, nautofd multi-mode parallel port/fdc mux 16c550 compatible serial port 1 16c550 compatible serial port 2 ide configuration registers decoder power management interface control bus address bus data bus clock gen serial clock clk 1 clk2 nindex ntrk0 ndskchg nwrprt nwgate densel ndir nstep drate0 drate1 nhdsel nds0,1,2,3 nmtr0,1,2,3 rdata rclock wdata wclock nwdata nrdata nideenlo, nideenhi nhdcs0, nhdcs1 niocs16 txd2, ncts2, nrts2 rxd2 ndsr2, ndcd2, nri2, ndtr2 ided7 rxd1 pd0-7 busy, slct, pe, nerror, nack nstrobe, nslctin, ngamecs pwrgd (FDC37C665GT only) (fdc37c666gt only) vcc (2) vss (4) smsc proprietary 82077 compatible vertical floppydisk controller core digital data separator with write precom- pensation pdir host cpu interface nior niow aen a0-a9 do-d7 fdrq ndack irq3 irq4 pintr fintr reset tc pdrq pdack a10 iochrdy pintr2
21 24 mhz crystal FDC37C665GT fdc36c666gt clock 1 clock 2 20 pf 20 pf figure 2 - suggested 24 mhz oscillator circuit
22 functional description super i/o registers the address map, shown below in table 1, shows the addresses of the different blocks of the super i/o immediately after power up. the base addresses of the fdc, ide, serial and parallel ports can be moved via the configuration registers. some addresses are used to access more than one register. host processor interface the host processor communicates with the FDC37C665GT/666gt through a series of read/write registers. the port addresses for these registers are shown in table 1. register access is accomplished through programmed i/o or dma transfers. all registers are 8 bits wide except the ide data register at port 1f0h which is 16 bits wide. all host interface output buffers are capable of sinking a minimum of 24 ma. table 1 - FDC37C665GT/666gt block addresses address block name notes 3f0, 3f1 configuration write only; note 1, 2 3f0, 3f1 floppy disk read only; address at power up; note 2 3f2, 3f3, 3f4, 3f5, 3f7 floppy disk address at power up; note 2 3f8-3ff serial port com 1 address at power up; note 2 2f8-2ff serial port com 2 address at power up; note 2 278-27a parallel port address at power up; note 2 1f0-1f7, 3f6, 3f7 ide at mode; note 2, 3 note 1: configuration registers can only be modified in configuration mode, entered only by writing a security code sequence to 3f0. the configuration registers can only be read in configuration mode by accessing 3f1. access to status registers a and b of the floppy disk is disabled in configuration mode. outside of configuration mode, a read of 3f0 accesses status register a and a read of 3f1 accesses status register b of the floppy disk. note 2: address at p ower up; these addresses can be changed in the configuration setup. note 3: addresses 320h-323h and 3f5-3f7h for xt mode. selectable in configuration setup.
23 floppy disk controller the floppy disk controller (fdc) provides the interface between a host microprocessor and the floppy disk drives. the fdc integrates the functions of the formatter/controller, digital data separator, write precompensation and data rate selection logic for an ibm xt/at compatible fdc. the true cmos 765b core guarantees 100% ibm pc xt/at compatibility in addition to providing data overflow and underflow protection. the FDC37C665GT and fdc37c666gt are compatible to the 82077aa using smsc's proprietary floppy disk controller core. floppy disk controller internal registers the floppy disk controller contains eight internal registers which facilitate the interfacing between the host microprocessor and the disk drive. table 2 shows the addresses required to access these registers. registers other than the ones shown are not supported. the rest of the description assumes that the primary addresses have been selected. table 2 - status, data and control registers primary address secondary address register 3f0 3f1 3f2 3f3 3f4 3f4 3f5 3f6 3f7 3f7 370 371 372 373 374 374 375 376 377 377 r r r/w r/w r w r/w r w status register a status register b digital output register tape drive register main status register data rate select register data (fifo) reserved digital input register configuration control register sra srb dor tsr msr dsr fifo dir ccr for information on the floppy disk on parallel port pins, refer to configuration register cr4 and parallel port floppy disk controller description.
24 status register a (sra) address 3f0 read only this register is read-only and monitors the state of the fintr pin and several disk interface pins, in ps/2 and model 30 modes. the sra can be accessed at any time when in ps/2 mode. in the pc/at mode the data bus pins d0 - d7 are held in a high impedance state for a read of address 3f0. ps/2 mode bit 0 direction active high status indicating the direction of head movement. a logic "1" indicating inward direction a logic "0" outward. bit 1 nwrite protect active low status of the write protect disk interface input. a logic "0" indicating that the disk is write protected. bit 2 nindex active low status of the index disk interface input. bit 3 head select active high status of the hdsel disk interface input. a logic "1" selects side 1 and a logic "0" selects side 0. bit 4 ntrack 0 active low status of the trk0 disk interface input. bit 5 step active high status of the step output disk interface output pin. bit 6 ndrv2 active low status of the drv2 disk interface input pin, indicating that a second drive has been installed. bit 7 interrupt pending active high bit indicating the state of the floppy disk interrupt output. 7 6 5 4 3 2 1 0 int pending ndrv2 step ntrk0 hdsel nindx nwp dir reset cond. 0 n/a 0 n/a 0 n/a n/a 0
25 ps/2 model 30 mode bit 0 ndirection active low status indicating the direction of head movement. a logic "0" indicating inward direction a logic "1" outward. bit 1 write protect active high status of the write protect disk interface input. a logic "1" indicating that the disk is write protected. bit 2 index active high status of the index disk interface input. bit 3 nhead select active low status of the hdsel disk interface input. a logic "0" selects side 1 and a logic "1" selects side 0. bit 4 track 0 active high status of the trk0 disk interface input. bit 5 step active high status of the latched step disk interface output pin. this bit is latched with the step output going active, and is cleared with a read from the dir register, or with a hardware or software reset. bit 6 dma request active high status of the drq output pin. bit 7 interrupt pending active high bit indicating the state of the floppy disk interrupt output. 7 6 5 4 3 2 1 0 int pending drq step f/f trk0 nhdsel indx wp ndir reset cond. 0 0 0 n/a 1 n/a n/a 1
26 status register b (srb) address 3f1 read only this register is read-only and monitors the state of several disk interface pins, in ps/2 and model 30 modes. the srb can be accessed at any time when in ps/2 mode. in the pc/at mode the data bus pins d0 - d7 are held in a high impedance state for a read of address 3f1. ps/2 mode bit 0 motor enable 0 active high status of the mtr0 disk interface output pin. this bit is low after a hardware reset and unaffected by a software reset. bit 1 motor enable 1 active high status of the mtr1 disk interface output pin. this bit is low after a hardware reset and unaffected by a software reset. bit 2 write gate active high status of the wgate disk interface output. bit 3 read data toggle every inactive edge of the rdata input causes this bit to change state. bit 4 write data toggle every inactive edge of the wdata input causes this bit to change state. bit 5 drive select 0 reflects the status of the drive select 0 bit of the dor (address 3f2 bit 0). this bit is cleared after a hardware reset, it is unaffected by a software reset. bit 6 reserved always read as a logic "1". bit 7 reserved always read as a logic "1". 7 6 5 4 3 2 1 0 1 1 drive sel0 wdata toggle rdata toggle wgate mot en1 mot en0 reset cond. 1 1 0 0 0 0 0 0
27 ps/2 model 30 mode bit 0 ndrive select 2 active low status of the ds2 disk interface output. bit 1 ndrive select 3 active low status of the ds3 disk interface output. bit 2 write gate active high status of the latched wgate output signal. this bit is latched by the active going edge of wgate and is cleared by the read of the dir register. bit 3 read data active high status of the latched rdata output signal. this bit is latched by the inactive going edge of rdata and is cleared by the read of the dir register. bit 4 write data active high status of the latched wdata output signal. this bit is latched by the inactive going edge of wdata and is cleared by the read of the dir register. this bit is not gated with wgate. bit 5 ndrive select 0 active low status of the ds0 disk interface output. bit 6 ndrive select 1 active low status of the ds1 disk interface output. bit 7 ndrv2 active low status of the drv2 disk interface input. 7 6 5 4 3 2 1 0 ndrv2 nds1 nds0 wdata f/f rdata f/f wgate f/f nds3 nds2 reset cond. n/a 1 1 0 0 0 1 1
28 digital output register (dor) address 3f2 read/write the dor controls the drive select and motor enables of the disk interface outputs. it also contains the enable for the dma logic and contains a software reset bit. the contents of the dor are unaffected by a software reset. the dor can be written to at any time. bit 0 and 1 drive select these two bits a are binary encoded for the four drive selects ds0-ds3, thereby allowing only one drive to be selected at a time. bit 2 nreset a logic "0" written to this bit resets the floppy disk controller. this reset will remain active until a logic "1" is written to this bit. this software reset does not affect the dsr and ccr registers, nor does it affect the other bits of the dor register. the minimum reset duration required is 100ns, therefore toggling this bit by consecutive writes to this register is a valid method of issuing a software reset. bit 3 dmaen pc/at and model 30 mode: writing this bit to logic "1" will enable the drq, ndack, tc and fintr outputs. this bit being a logic "0" will disable the ndack and tc inputs, and hold the drq and fintr outputs in a high impedance state. this bit is a logic "0" after a reset and in these modes. ps/2 mode: in this mode the drq, ndack, tc and fintr pins are always enabled. during a reset, the drq, ndack, tc, and fintr pins will remain enabled, but this bit will be cleared to a logic "0". bit 4 motor enable 0 this bit controls the mtr0 disk interface output. a logic "1" in this bit will cause the output pin to go active. bit 5 motor enable 1 this bit controls the mtr1 disk interface output. a logic "1" in this bit will cause the output pin to go active. bit 6 motor enable 2 this bit controls the mtr2 disk interface output. a logic "1" in this bit will cause the output pin to go active. bit 7 motor enable 3 this bit controls the mtr3 disk interface output. a logic "1" in this bit causes the output to go active. table 3 - drive activation values 7 6 5 4 3 2 1 0 mot en3 mot en2 mot en1 mot en0 dmaen nrese t drive sel1 drive sel0 reset cond. 0 0 0 0 0 0 0 0 drive dor value 0 1 2 3 1ch 2dh 4eh 8fh
29 tape drive register (tdr) address 3f3 read/write this register is included for 82077 software compatability. the robust digital data separator used in the FDC37C665GT does not require its characteristics modified for tape support. the contents of this register are not used internal to the device. the tdr is unaffected by a software reset. bits 2-7 are tri-stated when read in this mode. table 4- tape select bits table 5 - internal 4 drive decode - normal digital output register drive select outputs (active low) motor on outputs (active low) bit 7 bit 6 bit 5 bit 4 bit1 bit 0 nds3 nds2 nds1 nds0 nmtr3 nmtr2 nmtr1 nmtr0 x x x 1 0 0 1 1 1 0 nbit 7 nbit 6 nbit 5 nbit 4 x x 1 x 0 1 1 1 0 1 nbit 7 nbit 6 nbit 5 nbit 4 x 1 x x 1 0 1 0 1 1 nbit 7 nbit 6 nbit 5 nbit 4 1 x x x 1 1 0 1 1 1 nbit 7 nbit 6 nbit 5 nbit 4 0 0 0 0 x x 1 1 1 1 nbit 7 nbit 6 nbit 5 nbit 4 table 6 - internal 4 drive decode - drives 0 and 1 swapped digital output register drive select outputs (active low) motor on outputs (active low) bit 7 bit 6 bit 5 bit 4 bit1 bit 0 nds3 nds2 nds1 nds0 nmtr3 nmtr2 nmtr1 nmtr0 x x x 1 0 0 1 1 0 1 nbit 7 nbit 6 nbit 4 nbit 5 x x 1 x 0 1 1 1 1 0 nbit 7 nbit 6 nbit 4 nbit 5 x 1 x x 1 0 1 0 1 1 nbit 7 nbit 6 nbit 4 nbit 5 1 x x x 1 1 0 1 1 1 nbit 7 nbit 6 nbit 4 nbit 5 0 0 0 0 x x 1 1 1 1 nbit 7 nbit 6 nbit 4 nbit 5 tape sel1 tape sel2 drive selected 0 0 1 1 0 1 0 1 none 1 2 3
30 table 7 - external 2 to 4 drive decode - normal digital output register drive select outputs (active low) motor on outputs (active low) bit 7 bit 6 bit 5 bit 4 bit1 bit 0 nds1 nds0 nmtr1 nmtr0 x x x 1 0 0 0 0 1 0 x x 1 x 0 1 0 1 1 0 x 1 x x 1 0 1 0 1 0 1 x x x 1 1 1 1 1 0 x x x 0 0 0 0 0 1 1 x x 0 x 0 1 0 1 1 1 x 0 x x 1 0 1 0 1 1 0 x x x 1 1 1 1 1 1 table 8 - external 2 to 4 drive decode - drives 0 and 1 swapped digital output register drive select outputs (active low) motor on outputs (active low) bit 7 bit 6 bit 5 bit 4 bit1 bit 0 nds1 nds0 nmtr1 nmtr0 x x x 1 0 0 0 1 1 0 x x 1 x 0 1 0 0 1 0 x 1 x x 1 0 1 0 1 0 1 x x x 1 1 1 1 1 0 x x x 0 0 0 0 1 1 1 x x 0 x 0 1 0 0 1 1 x 0 x x 1 0 1 0 1 1 0 x x x 1 1 1 1 1 1
31 normal floppy mode normal mode. register 3f3 contains only bits 0 and 1. when this register is read, bits 2 - 7 are a high impedance. db7 db6 db5 db4 db3 db2 db1 db0 reg 3f3 tri-state tri-state tri-state tri-state tri-state tri-state tape sel1 tape sel0 enhanced floppy mode 2 (os2) register 3f3 for enhanced floppy mode 2 operation. db7 db6 db5 db4 db3 db2 db1 db0 reg 3f3 media id1 media id0 drive type id floppy boot drive tape sel1 tape sel0 for this mode, drate0 and drate1 pins are inputs, and these inputs are gated into bits 6 and 7 of the 3f3 register. these two bits are not affected by a hard or soft reset. bit 7 media id 1 read only (pin 18) (see table 9) bit 6 media id 0 read only (pin 19) (see table 10) bits 5 and 4 drive type id - these bits reflect two of the bits of configuration register 6. which two bits depends on the last drive selected in the digital output register (3f2). (see table 11) bits 3 and 2 floppy boot drive - these bits reflect the value of configuration register 7 bits 1, 0. bit 3 = cr7 bit db1. bit 2 = cr7 bit db0. bits 1 and 0 - tape drive select (read/write). same as in normal and enhanced floppy mode. 1. table 9 - media id1 drate1 input media id1 bit 7 pin 18 cr7-db3 = 0 cr7-db3 = 1 0 0 1 1 1 0 table 10 - media id0 drate0 input media id0 bit 6 pin 19 cr7-db2 = 0 cr7-db2 = 1 0 0 1 1 1 0
32 table 11 - drive type id digital output register register 3f3 - drive type id bit 1 bit 0 bit 5 bit 4 0 0 cr6 - bit 1 cr6 - bit 0 0 1 cr6 - bit 3 cr6 - bit 2 1 0 cr6 - bit 5 cr6 - bit 4 1 1 cr6 - bit 7 cr6 - bit 6
33 data rate select register (dsr) address 3f4 write only this register is write only. it is used to program the data rate, amount of write precompensation, power down status, and software reset. the data rate is programmed using the configuration control register (ccr) not the dsr, for pc/at and ps/2 model 30 and microchannel applications. other applications can set the data rate in the dsr. the data rate of the floppy controller is the most recent write of either the dsr or ccr. the dsr is unaffected by a software reset. a hardware reset will set the dsr to 02h, which corresponds to the default precompensation setting and 250kb/s. bit 0 and 1 data rate select these bits control the data rate of the floppy controller. see table 13 for the settings corresponding to the individual data rates. the data rate select bits are unaffected by a software reset, and are set to 250kb/s after a hardware reset. bit 2 through 4 precompensation select these three bits select the value of write precompensation that will be applied to the wdata output signal. table 12 shows the precompensation values for the combination of these bits settings. track 0 is the default starting track number to start precompensation. this starting track number can be changed by the configure command. bit 5 undefined should be written as a logic "0". bit 6 low power a logic "1" written to this bit will put the floppy controller into manual low power mode. the floppy controller clock and data separator circuits will be turned off. the controller will come out of manual low power mode after a software reset or access to the data register or main status register. bit 7 software reset this active high bit has the same function as the dor reset (dor bit 2) except that this bit is self clearing. table 12 - precompensation delays 7 6 5 4 3 2 1 0 s/w reset power down 0 pre- comp2 pre- comp1 pre- comp0 drate sel1 drate sel0 reset cond. 0 0 0 0 0 0 1 0 precomp 432 precompensation delay 111 001 010 011 100 101 110 000 0.00 ns-disabled 41.67 ns 83.34 ns 125.00 ns 166.67 ns 208.33 ns 250.00 ns default (see table 14)
34 table 13 - data rates table 14 - default precompensation delays main status register address 3f4 read only the main status register is a read-only register and indicates the status of the disk controller. the main status register can be read at any time. the msr indicates when the disk controller is ready to receive data via the data register. it should be read before each byte transferring to or from the data register except in dma mode. no delay is required when reading the msr after a data transfer. bit 0 - 3 drv x busy these bits are set to 1s when a drive is in the seek portion of a command, including implied and overlapped seeks and recalibrates. bit 4 command busy this bit is set to a 1 when a command is in progress. this bit will go active after the command byte has been accepted and goes inactive at the end of the results phase. if there is no result phase (seek, recalibrate commands), this bit is returned to a 0 after the last command byte. bit 5 non-dma this mode is selected in the specify command and will be set to a 1 during the execution phase of a command. this is for polled data transfers and helps differentiate between the data transfer phase and the reading of result bytes. bit 6 dio indicates the direction of a data transfer once a rqm is set. a 1 indicates a read and a 0 indicates a write is required. bit 7 rqm indicates that the host can transfer data if set to a 1. no access is permitted if set to a 0. dratesel data rate 1 0 mfm fm 1 0 0 1 1 0 1 0 1 mbps 500 kbps 300 kbps 250 kbps illegal 250 kbps 150 kbps 125 kbps data rate precompensation delays 1 mbps 500 kbps 300 kbps 250 kbps 41.67 ns 125 ns 125 ns 125 ns 7 6 5 4 3 2 1 0 rqm dio non dma cmd busy drv3 busy drv2 busy drv1 busy drv0 busy
35 data register (fifo) address 3f5 read/write all command parameter information, disk data and result status are transferred between the host processor and the floppy disk controller through the data register. data transfers are governed by the rqm and dio bits in the main status register. the data register defaults to fifo disabled mode after any form of reset. this maintains pc/at hardware compatibility. the default values can be changed through the configure command (enable full fifo operation with threshold control). the advantage of the fifo is that it allows the system a larger dma latency without causing a disk error. table 15 gives several examples of the delays with a fifo. the data is based upon the following formula: at the start of a command, the fifo action is always disabled and command parameters must be sent based upon the rqm and dio bit settings. as the command execution phase is entered, the fifo is cleared of any data to ensure that invalid data is not transferred. an overrun or underrun will terminate the current command and the transfer of data. disk writes will complete the current sector by generating a 00 pattern and valid crc. reads require the host to remove the remaining data so that the result phase may be entered. table 15 - fifo service delay fifo threshold examples maximum delay to servicing at 1 mbps data rate 1 byte 2 bytes 8 bytes 15 bytes 1 x 8 m s - 1.5 m s = 6.5 m s 2 x 8 m s - 1.5 m s = 14.5 m s 8 x 8 m s - 1.5 m s = 62.5 m s 15 x 8 m s - 1.5 m s = 118.5 m s fifo threshold examples maximum delay to servicing at 500 kbps data rate 1 byte 2 bytes 8 bytes 15 bytes 1 x 16 m s - 1.5 m s = 14.5 m s 2 x 16 m s - 1.5 m s = 30.5 m s 8 x 16 m s - 1.5 m s = 126.5 m s 15 x 16 m s - 1.5 m s = 238.5 m s threshold # x 1 data rate x 8 - 1.5 m s = delay
36 digital input register (dir) address 3f7 read only this register is read-only in all modes. pc-at mode bit 0 - 6 undefined the data bus outputs d0 - 6 will remain in a high impedance state during a read of this register. bit 7 dskchg this bit monitors the pin of the same name and reflects the opposite value seen on the disk cable. ps/2 mode bit 0 nhigh dens this bit is low whenever the 500 kbps or 1 mbps data rates are selected, and high when 250kbps and 300kbps are selected. bits 1 - 2 data rate select these bits control the data rate of the floppy controller. see table 13 for the settings corresponding to the individual data rates. the data rate select bits are unaffected by a software reset, and are set to 250kb/s after a hardware reset. bits 3 - 6 undefined always read as a logic "1" bit 7 dskchg this bit monitors the pin of the same name and reflects the opposite value seen on the disk cable. 7 6 5 4 3 2 1 0 dsk chg reset cond. n/a n/a n/a n/a n/a n/a n/a n/a 7 6 5 4 3 2 1 0 dsk chg 1 1 1 1 drate sel1 drate sel0 nhigh dens reset cond. n/a n/a n/a n/a n/a n/a n/a 1
37 model 30 mode bits 0 - 1 data rate select these bits control the data rate of the floppy controller. see table 13 for the settings corresponding to the individual data rates. the data rate select bits are unaffected by a software reset, and are set to 250kb/s after a hardware reset. bit 2 noprec this bit reflects the value of noprec bit set in the ccr register. bit 3 dmaen this bit reflects the value of dmaen bit set in the dor register bit 3. bits 4 - 6 undefined always read as a logic "0" bit 7 dskchg this bit monitors the pin of the same name and reflects the opposite value seen on the pin. 7 6 5 4 3 2 1 0 dsk chg 0 0 0 dmaen noprec drate sel1 drate sel0 reset cond. n/a 0 0 0 0 0 1 0
38 configuration control register (ccr) address 3f7 write only pc/at and ps/2 modes bit 0 and 1 data rate select 0 and 1 these bits determine the data rate of the floppy controller. see table 13 for the appropriate values. bit 2 - 7 reserved should be set to a logical "0" ps/2 model 30 mode bit 0 and 1 data rate select 0 and 1 these bits determine the data rate of the floppy controller. see table 13 for the appropriate values. bit 2 no precompensation this bit can be set by software, but it has no functionality. it can be read by bit 2 of the dsr when in model 30 register mode. unaffected by software reset. bit 3 - 7 reserved should be set to a logical "0" table 16 shows the state of the densel pin. the densel pin is set high after a hardware reset and is unaffected by the dor and the dsr resets. table 16 - densel encoding 7 6 5 4 3 2 1 0 drate sel1 drate sel0 reset cond. n/a n/a n/a n/a n/a n/a 1 0 7 6 5 4 3 2 1 0 noprec drate sel1 drate sel0 reset cond. n/a n/a n/a n/a n/a n/a 1 0 data rate ident densel 1mbps 0 0 1 1 500kbps 0 0 1 1 300kps 0 1 1 0 250kbps 0 1 1 0
39 status register encoding during the result phase of certain commands, the data register contains data bytes that give the status of the command just executed. table 17 - st atus register 0 bit no. symbol name description 7,6 ic interrupt code 00 - normal termination of command. the specified command was properly executed and completed without error. 01 - abnormal termination of command. command execution was started, but was not successfully completed. 10 - invalid command. the requested command could not be executed. 11 - abnormal termination caused by polling. 5 se seek end the fdc completed a seek, relative seek or recalibrate command (used during a sense interrupt command). 4 ec equipment check the trk0 pin failed to become a "1" after: 1. 80 step pulses in the recalibrate command. 2. the relative seek command caused the fdc to step outward beyond track 0. 3 unused. this bit is always "0". 2 h head address the current head address. 1,0 ds1,0 drive select the current selected drive.
40 table 18 - status register 1 bit no. symbol name description 7 en end of cylinder the fdc tried to access a sector beyond the final sector of the track (255d). will be set if tc is not issued after read or write data command. 6 unused. this bit is always "0". 5 de data error the fdc detected a crc error in either the id field or the data field of a sector. 4 or overrun/ underrun becomes set if the fdc does not receive cpu or dma service within the required time interval, resulting in data overrun or underrun. 3 unused. this bit is always "0". 2 nd no data any one of the following: 1. read data, read deleted data command - the fdc did not find the specified sector. 2. read id command - the fdc cannot read the id field without an error. 3. read a track command - the fdc cannot find the proper sector sequence. 1 nw not writable wp pin became a "1" while the fdc is executing a write data, write deleted data, or format a track command. 0 ma missing address mark any one of the following: 1. the fdc did not detect an id address mark at the specified track after encountering the index pulse from the idx pin twice. 2. the fdc cannot detect a data address mar k or a deleted data address mark on the specified track.
41 table 19 - status register 2 bit no. symbol name description 7 unused. this bit is always "0". 6 cm control mark any one of the following: 1. read data command - the fdc encountered a deleted data address mark. 2. read deleted data command - the fdc encountered a data address mark. 5 dd data error in data field the fdc detected a crc error in the data field. 4 wc wrong cylinder the track address from the sector id field is different from the track address maintained inside the fdc. 3 unused. this bit is always "0". 2 unused. this bit is always "0". 1 bc bad cylinder the track address from the sector id field is different from the track address maintained inside the fdc and is equal to ff hex, which indicates a bad track with a hard error according to the ibm soft-sectored format. 0 md missing data address mark the fdc cannot detect a data address mark or a deleted data address mark.
42 table 20- status register 3 bit no. symbol name description 7 unused. this bit is always "0". 6 wp write protected indicates the status of the wp pin. 5 unused. this bit is always "1". 4 t0 track 0 indicates the status of the trk0 pin. 3 unused. this bit is always "1". 2 hd head address indicates the status of the hdsel pin. 1,0 ds1,0 drive select indicates the status of the ds1, ds0 pins. reset there are three sources of system reset on the fdc: the reset pin of the FDC37C665GT, a reset generated via a bit in the dor, and a reset generated via a bit in the dsr. at power on, a power on reset initializes the fdc. all resets take the fdc out of the power down state. all operations are terminated upon a reset, and the fdc enters an idle state. a reset while a disk write is in progress will corrupt the data and crc. on exiting the reset state, various internal registers are cleared, including the configure command information, and the fdc waits for a new command. drive polling will start unless disabled by a new configure command. reset pin (hardware reset) the reset pin is a global reset and clears all registers except those programmed by the specify command. the dor reset bit is enabled and must be cleared by the host to exit the reset state. dor reset vs. dsr reset (software reset) these two resets are functionally the same. both will reset the fdc core, which affects drive status information and the fifo circuits. the dsr reset clears itself automatically while the dor reset requires the host to manually clear it. dor reset has precedence over the dsr reset. the dor reset is set automatically upon a pin reset. the user must manually clear this reset bit in the dor to exit the reset state. modes of operation the fdc has three modes of operation, pc/at mode, ps/2 mode and model 30 mode. these are determined by the state of the ident and mfm bits 6 and 5 respectively of configuration register 3. pc/at mode - (ident high, mfm a "don't care") the pc/at register set is enabled, the dma enable bit of the dor becomes valid (fintr and drq can be hi z), and tc and densel become active high signals.
43 ps/2 mode - (ident low, mfm high) this mode supports the ps/2 models 50/60/80 configuration and register set. the dma bit of the dor becomes a "don't care", (fintr and drq are always valid), tc and densel become active low. model 30 mode - (ident low, mfm low) this mode supports ps/2 model 30 configuration and register set. the dma enable bit of ther dor becomes valid (fintr and drq can be hi z), tc is active high and densel is active low. dma transfers dma transfers are enabled with the specify command and are initiated by the fdc by activating the fdrq pin during a data transfer command. the fifo is enabled directly by asserting ndack and addresses need not be valid. note that if the dma controller (i.e. 8237a) is programmed to function in verify mode, a pseudo read is performed by the fdc based only on ndack. this mode is only available when the fdc has been configured into byte mode (fifo disabled) and is programmed to do a read. with the fifo enabled, the fdc can perform the above operation by using the new verify command; no dma operation is needed. controller phases for simplicity, command handling in the fdc can be divided into three phases: command, execution, and result. each phase is described in the following sections. command phase after a reset, the fdc enters the command phase and is ready to accept a command from the host. for each of the commands, a defined set of command code bytes and parameter bytes has to be written to the fdc before the command phase is complete. (please refer to table 21 for the command set descriptions.) these bytes of data must be transferred in the order prescribed. before writing to the fdc, the host must examine the rqm and dio bits of the main status register. rqm and dio must be equal to "1" and "0" respectively before command bytes may be written. rqm is set false by the fdc after each write cycle until the received byte is processed. the fdc asserts rqm again to request each parameter byte of the command unless an illegal command condition is detected. after the last parameter byte is received, rqm remains "0" and the fdc automatically enters the next phase as defined by the command definition. the fifo is disabled during the command phase to provide for the proper handling of the "invalid command" condition. execution phase all data transfers to or from the fdc occur during the execution phase, which can proceed in dma or non-dma mode as indicated in the specify command. after a reset, the fifo is disabled. each data byte is transferred by an fint or fdrq depending on the dma mode. the configure command can enable the fifo and set the fifo threshold value. the following paragraphs detail the operation of the fifo flow control. in these descriptions, is defined as the number of bytes available to the fdc when service is requested from the host and ranges from 1 to 16. the parameter fifothr, which the user programs, is one less and ranges from 0 to 15.
44 a low threshold value (i.e. 2) results in longer periods of time between service requests, but requires faster servicing of the request for both read and write cases. the host reads (writes) from (to) the fifo until empty (full), then the transfer request goes inactive. the host must be very responsive to the service request. this is the desired case for use with a "fast" system. a high value of threshold (i.e. 12) is used with a "sluggish" system by affording a long latency period after a service request, but results in more frequent service requests. non-dma mode - transfers from the fifo to the host the fint pin and rqm bits in the main status register are activated when the fifo contains (16-) bytes or the last bytes of a full sector have been placed in the fifo. the fint pin can be used for interrupt-driven systems, and rqm can be used for polled systems. the host must respond to the request by reading data from the fifo. this process is repeated until the last byte is transferred out of the fifo. the fdc will deactivate the fint pin and rqm bit when the fifo becomes empty. non-dma mode - transfers from the host to the fifo the fint pin and rqm bit in the main status register are activated upon entering the execution phase of data transfer commands. the host must respond to the request by writing data into the fifo. the fint pin and rqm bit remain true until the fifo becomes full. they are set true again when the fifo has bytes remaining in the fifo. the fint pin will also be deactivated if tc and ndack both go inactive. the fdc enters the result phase after the last byte is taken by the fdc from the fifo (i.e. fifo empty condition). dma mode - transfers from the fifo to the host the fdc activates the fdrq pin when the fifo contains (16 - ) bytes, or the last byte of a full sector transfer has been placed in the fifo. the dma controller must respond to the request by reading data from the fifo. the fdc will deactivate the fdrq pin when the fifo becomes empty. fdrq goes inactive after ndack goes active for the last byte of a data transfer (or on the active edge of nior, on the last byte, if no edge is present on ndack). a data underrun may occur if fdrq is not removed in time to prevent an unwanted cycle. dma mode - transfers from the host to the fifo the fdc activates the fdrq pin when entering the execution phase of the data transfer commands. the dma controller must respond by activating the ndack and niow pins and placing data in the fifo. fdrq remains active until the fifo becomes full. fdrq is again set true when the fifo has bytes remaining in the fifo. the fdc will also deactivate the fdrq pin when tc becomes true (qualified by ndack), indicating that no more data is required. fdrq goes inactive after ndack goes active for the last byte of a data transfer (or on the active edge of niow of the last byte, if no edge is present on ndack). a data overrun may occur if fdrq is not removed in time to prevent an unwanted cycle. data transfer termination the fdc supports terminal count explicitly through the tc pin and implicitly through the underrun/overrun and end-of-track (eot) functions. for full sector transfers, the eot parameter can define the last sector to be transferred in a single or multi-sector transfer.
45 if the last sector to be transferred is a partial sector, the host can stop transferring the data in mid-sector, and the fdc will continue to complete the sector as if a hardware tc was received. the only difference between these implicit functions and tc is that they return "abnormal termination" result status. such status indications can be ignored if they were expected. note that when the host is sending data to the fifo of the fdc, the internal sector count will be complete when the fdc reads the last byte from its side of the fifo. there may be a delay in the removal of the transfer request signal of up to the time taken for the fdc to read the last 16 bytes from the fifo. the host must tolerate this delay. result phase the generation of fint determines the beginning of the result phase. for each of the commands, a defined set of result bytes has to be read from the fdc before the result phase is complete. these bytes of data must be read out for another command to start. rqm and dio must both equal "1" before the result bytes may be read. after all the result bytes have been read, the rqm and dio bits switch to "1" and "0" respectively, and the cb bit is cleared, indicating that the fdc is ready to accept the next command.
46 command set/descriptions commands can be written whenever the fdc is in the command phase. each command has a unique set of needed parameters and status results. the fdc checks to see that the first byte is a valid command and, if valid, proceeds with the command. if it is invalid, an interrupt is issued. the user sends a sense interrupt status command which returns an invalid command error. refer to table 21 for explanations of the various symbols used. table 22 lists the required parameters and the results associated with each command that the fdc is capable of performing. table 21 - description of command symbols symbol name description c cylinder address the currently selected address; 0 to 255. d data pattern the pattern to be written in each sector data field during formatting. d0, d1, d2, d3 drive select 0-3 designates which drives are perpendicular drives on the perpendicular mode command. a "1" indicates a perpendicular drive. dir direction control if this bit is 0, then the head will step out from the spindle during a relative seek. if set to a 1, the head will step in toward the spindle. ds0, ds1 disk drive select ds1 ds0 drive 0 0 drive 0 0 1 drive 1 1 0 drive 2 1 1 drive 3 dtl special sector size by setting n to zero (00), dtl may be used to control the number of bytes transferred in disk read/write commands. the sector size (n = 0) is set to 128. if the actual sector (on the diskette) is larger than dtl, the remainder of the actual sector is read but is not passed to the host during read commands; during write commands, the remainder of the actual sector is written with all zero bytes. the crc check code is calculated with the actual sector. when n is not zero, dtl has no meaning and should be set to ff hex. ec enable count when this bit is "1" the "dtl" parameter of the verify command becomes sc (number of sectors per track). efifo enable fifo this active low bit when a 0, enables the fifo. a "1" disables the fifo (default). eis enable implied seek when set, a seek operation will be performed before executing any read or write command that requires the c parameter in the command phase. a "0" disables the implied seek. eot end of track the final sector number of the current track.
47 table 21 - description of command symbols symbol name description gap alters gap 2 length when using perpendicular mode. gpl gap length the gap 3 size. (gap 3 is the space between sectors excluding the vco synchronization field). h/hds head address selected head: 0 or 1 (disk side 0 or 1) as encoded in the sector id field. hlt head load time the time interval that fdc waits after loading the head and before initializing a read or write operation. refer to the specify command for actual delays. hut head unload time the time interval from the end of the execution phase (of a read or write command) until the head is unloaded. refer to the specify command for actual delays. lock lock defines whether efifo, fifothr, and pretrk parameters of the configure command can be reset to their default values by a "software reset". (a reset caused by writing to the appropriate bits of either tha dsr or dor) mfm mfm/fm mode selector a one selects the double density (mfm) mode. a zero selects single density (fm) mode.
48 table 21 - description of command symbols symbol name description mt multi-track selector when set, this flag selects the multi-track operating mode. in this mode, the fdc treats a complete cylinder under head 0 and 1 as a single track. the fdc operates as this expanded track started at the first sector under head 0 and ended at the last sector under head 1. with this flag set, a multitrack read or write operation will automatically continue to the first sector under head 1 when the fdc finishes operating on the last sector under head 0. n sector size code this specifies the number of bytes in a sector. if this parameter is "00", then the sector size is 128 bytes. the number of bytes transferred is determined by the dtl parameter. otherwise the sector size is (2 raised to the "n'th" power) times 128. all values up to "07" hex are allowable. "07"h would equal a sector size of 16k. it is the user's responsibility to not select combinations that are not possible with the drive. ncn new cylinder number the desired cylinder number. nd non-dma mode flag when set to 1, indicates that the fdc is to operate in the non- dma mode. in this mode, the host is interrupted for each data transfer. when set to 0, the fdc operates in dma mode, interfacing to a dma controller by means of the drq and ndack signals. ow overwrite the bits d0-d3 of the perpendicular mode command can only be modified if ow is set to 1. ow id defined in the lock command. pcn present cylinder number the current position of the head at the completion of sense interrupt status command. poll polling disable when set, the internal polling routine is disabled. when clear, polling is enabled. pretrk precompensation start track number programmable from track 00 to ffh. r sector address the sector number to be read or written. in multi-sector transfers, this parameter specifies the sector number of the first sector to be read or written. rcn relative cylinder number relative cylinder offset from present cylinder as used by the relative seek command. sc number of sectors per track the number of sectors per track to be initialized by the format command. the number of sectors per track to be verified during a verify command when ec is set.
49 table 21 - description of command symbols symbol name description sk skip flag when set to 1, sectors containing a deleted data address mark will automatically be skipped during the execution of read data. if read deleted is executed, only sectors with a deleted address mark will be accessed. when set to "0", the sector is read or written the same as the read and write commands. srt step rate interval the time interval between step pulses issued by the fdc. programmable from 0.5 to 8 milliseconds in increments of 0.5 ms at the 1 mbit data rate. refer to the specify command for actual delays. st0 st1 st2 st3 status 0 status 1 status 2 status 3 registers within the fdc which store status information after a command has been executed. this status information is available to the host during the result phase after command execution. wgate write gate alters timing of we to allow for pre-erase loads in perpendicular drives.
50 instruction set table 22 - i nstruction set read data phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w mt mfm sk 0 0 1 1 0 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after com mand execution. r -------- h -------- r -------- r -------- r -------- n --------
51 read deleted data phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w mt mfm sk 0 1 1 0 0 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after com mand execution. r -------- h -------- r -------- r -------- r -------- n --------
52 write data phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w mt mfm 0 0 0 1 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after command execution. r -------- h -------- r -------- r -------- r -------- n --------
53 write deleted data phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w mt mfm 0 0 1 0 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after command execution. r -------- h -------- r -------- r -------- r -------- n --------
54 read a track phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 mfm 0 0 0 0 1 0 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------- dtl ------- execution data transfer between the fdd and system. fdc reads all of cylinders' contents from index hole to eot. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after command execution. r -------- h -------- r -------- r -------- r -------- n --------
55 verify phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w mt mfm sk 1 0 1 1 0 command codes w ec 0 0 0 0 hds ds1 ds0 w -------- c -------- sector id information prior to command execution. w -------- h -------- w -------- r -------- w -------- n -------- w ------- eot ------- w ------- gpl ------- w ------ dtl/sc ------ execution no data transfer takes place. result r ------- st0 ------- status information after com mand execution. r ------- st1 ------- r ------- st2 ------- r -------- c -------- sector id information after command execution. r -------- h -------- r -------- r -------- r -------- n -------- version phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 1 0 0 0 0 command code result r 1 0 0 1 0 0 0 0 enhanced controller
56 format a track phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 mfm 0 0 1 1 0 1 command codes w 0 0 0 0 0 hds ds1 ds0 w -------- n -------- bytes/sector w -------- sc -------- sectors/cylinder w ------- gpl ------- gap 3 w -------- d -------- filler byte execution for each sector repeat: w -------- c -------- input sector parameters w -------- h -------- w -------- r -------- w -------- n -------- fdc formats an entire cylinder result r ------- st0 ------- status information after command execution r ------- st1 ------- r ------- st2 ------- r ------ undefined ------ r ------ undefined ------ r ------ undefined ------ r ------ undefined ------
57 recalibrate phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 0 0 1 1 1 command codes w 0 0 0 0 0 0 ds1 ds0 execution head retracted to track 0 interrupt. sense interrupt status phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 0 1 0 0 0 command codes result r ------- st0 ------- status information at the end of each seek operation. r ------- pcn ------- specify phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 0 0 0 1 1 command codes w --- srt --- --- hut --- w ------ hlt ------ nd
58 sense drive status phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 0 0 1 0 0 command codes w 0 0 0 0 0 hds ds1 ds0 result r ------- st3 ------- status information about fdd seek phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 0 1 1 1 1 command codes w 0 0 0 0 0 hds ds1 ds0 w ------- ncn ------- execution head positioned over proper cylinder on diskette. configure phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 1 0 0 1 1 configure information w 0 0 0 0 0 0 0 0 w 0 eis efifo poll --- fifothr --- execution w --------- pretrk ---------
59 relative seek phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 1 dir 0 0 1 1 1 1 w 0 0 0 0 0 hds ds1 ds0 w ------- rcn ------- dumpreg phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 0 1 1 1 0 *note: registers placed in fifo execution result r ------ pcn-drive 0 ------- r ------ pcn-drive 1 ------- r ------ pcn-drive 2 ------- r ------ pcn-drive 3 ------- r ---- srt ---- --- hut --- r ------- hlt ------- nd r ------- sc/eot ------- r lock 0 d3 d2 d1 d0 gap wgate r 0 eis efifo poll -- fifothr -- r -------- pretrk --------
60 read id phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 mfm 0 0 1 0 1 0 commands w 0 0 0 0 0 hds ds1 ds0 execution the first correct id information on the cylinder is stored in data register result r -------- st0 -------- status information after command execution. disk status after the command has completed r -------- st1 -------- r -------- st2 -------- r -------- c -------- r -------- h -------- r -------- r -------- r -------- n --------
61 perpendicular mode phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w 0 0 0 1 0 0 1 0 command codes ow 0 d3 d2 d1 d0 gap wgate invalid codes phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w ----- invalid codes ----- invalid command codes (noop - FDC37C665GT/666gt goes into stand by state) result r ------- st0 ------- st0 = 80h lock phase r/w data bus remarks d7 d6 d5 d4 d3 d2 d1 d0 command w lock 0 0 1 0 1 0 0 command codes result r 0 0 0 lock 0 0 0 0 sc is returned if the last command that was issued was the format command. eot is returned if the last command was a read or write. note: these bits are used internally only. they are not reflected in the drive select pins. it is the user's responsibility to maintain correspondence between these bits and the drive select pins (dor).
62 data transfer commands all of the read data, write data and verify type commands use the same parameter bytes and return the same results information, the only difference being the coding of bits 0-4 in the first byte. an implied seek will be executed if the feature was enabled by the configure command. this seek is completely transparent to the user. the drive busy bit for the drive will go active in the main status register during the seek portion of the command. if the seek portion fails, it will be reflected in the results status normally returned for a read/write data command. status register 0 (st0) would contain the error code and c would contain the cylinder on which the seek failed. read data a set of nine (9) bytes is required to place the fdc in the read data mode. after the read data command has been issued, the fdc loads the head (if it is in the unloaded state), waits the specified head settling time (defined in the specify command), and begins reading id address marks and id fields. when the sector address read off the diskette matches with the sector address specified in the command, the fdc reads the sector's data field and transfers the data to the fifo. after completion of the read operation from the current sector, the sector address is incremented by one and the data from the next logical sector is read and output via the fifo. this continuous read function is called "multi- sector read operation". upon receipt of tc, or an implied tc (fifo overrun/underrun), the fdc stops sending data but will continue to read data from the current sector, check the crc bytes, and at the end of the sector, terminate the read data command. n determines the number of bytes per sector (see table 23 below). if n is set to zero, the sector size is set to 128. the dtl value determines the number of bytes to be transferred. if dtl is less than 128, the fdc transfers the specified number of bytes to the host. for reads, it continues to read the entire 128-byte sector and checks for crc errors. for writes, it completes the 128-byte sector by filling in zeros. if n is not set to 00 hex, dtl should be set to ff hex and has no impact on the number of bytes transferred. table 23 - sector sizes the amount of data which can be handled with a single command to the fdc depends upon mt (multi-track) and n (number of bytes/sector). the multi-track function (mt) allows the fdc to read data from both sides of the diskette. for a particular cylinder, data will be transferred starting at sector 1, side 0 and completing the last sector of the same track at side 1. if the host terminates a read or write operation in the fdc, the id information in the result phase is dependent upon the state of the mt bit and eot byte. refer to table 24. at the completion of the read data command, the head is not unloaded until after the head unload time interval (specified in the specify command) has elapsed. if the host issues another command before the head unloads, then the head settling time may be saved between subsequent reads. n sector size 00 01 02 03 .. 07 128 bytes 256 bytes 512 bytes 1024 bytes ... 16 kbytes
63 if the fdc detects a pulse on the nindex pin twice without finding the specified sector (meaning that the diskette's index hole passes through index detect logic in the drive twice), the fdc sets the ic code in status register 0 to "01" indicating abnormal termination, sets the nd bit in status register 1 to "1" indicating a sector not found, and terminates the read data command. after reading the id and data fields in each sector, the fdc checks the crc bytes. if a crc error occurs in the id or data field, the fdc sets the ic code in status register 0 to "01" indicating abnormal termination, sets the de bit flag in status register 1 to "1", sets the dd bit in status register 2 to "1" if crc is incorrect in the id field, and terminates the read data command. table 25 describes the effect of the sk bit on the read data command execution and results. except where noted in table 25, the c or r value of the sector address is automatically incremented (see table 27). table 24 - effects of mt and n bits mt n maximum transfer capacity final sector read from d isk 0 1 0 1 0 1 1 1 2 2 3 3 256 x 26 = 6,656 256 x 52 = 13,312 512 x 15 = 7,680 512 x 30 = 15,360 1024 x 8 = 8,192 1024 x 16 = 16,384 26 at side 0 or 1 26 at side 1 15 at side 0 or 1 15 at side 1 8 at side 0 or 1 16 at side 1 table 25 - skip bit vs read data command sk bit value data address mark type encountered results sector read? cm bit of st2 set? description of results 0 0 1 1 normal data deleted data normal data deleted data yes yes yes no no yes no yes normal termination. address not incremented. next sector not searched for. normal termination. normal termination. sector not read ("skipped").
64 read deleted data this command is the same as the read data command, only it operates on sectors that contain a deleted data address mark at the beginning of a data field. table 26 describes the effect of the sk bit on the read deleted data command execution and results. except where noted in table 26, the c or r value of the sector address is automatically incremented (see table 27). table 26 - skip bit vs. read deleted data command sk bit value data address mark type encountered results sector read? cm bit of st2 set? description of results 0 0 1 1 normal data deleted data normal data deleted data yes yes no yes yes no yes no address not incremented. next sector not searched for. normal termination. normal termination. sector not read ("skipped"). normal termination. read a track this command is similar to the read data command except that the entire data field is read continuously from each of the sectors of a track. immediately after encountering a pulse on the nindex pin, the fdc starts to read all data fields on the track as continuous blocks of data without regard to logical sector numbers. if the fdc finds an error in the id or data crc check bytes, it continues to read data from the track and sets the appropriate error bits at the end of the command. the fdc compares the id information read from each sector with the specified value in the command and sets the nd flag of status register 1 to a "1" if there is no comparison. multi-track or skip operations are not allowed with this command. the mt and sk bits (bits d7 and d5 of the first command byte respectively) should always be set to "0". this command terminates when the eot specified number of sectors has not been read. if the fdc does not find an id address mark on the diskette after the second occurrence of a pulse on the idx pin, then it sets the ic code in status register 0 to "01" (abnormal termination), sets the ma bit in status register 1 to "1", and terminates the command.
65 table 27 - result phase table mt head final sector transferred to host d information at result phase c h r n 0 0 less than eot nc nc r + 1 nc equal to eot c + 1 nc 01 nc 1 less than eot nc nc r + 1 nc equal to eot c + 1 nc 01 nc 1 0 less than eot nc nc r + 1 nc equal to eot nc lsb 01 nc 1 less than eot nc nc r + 1 nc equal to eot c + 1 lsb 01 nc nc: no change, the same value as the one at the beginning of command execution. lsb: least significant bit, the lsb of h is complemented. write data after the write data command has been issued, the fdc loads the head (if it is in the unloaded state), waits the specified head load time if unloaded (defined in the specify command), and begins reading id fields. when the sector address read from the diskette matches the sector address specified in the command, the fdc reads the data from the host via the fifo and writes it to the sector's data field. after writing data into the current sector, the fdc computes the crc value and writes it into the crc field at the end of the sector transfer. the sector number stored in "r" is incremented by one, and the fdc continues writing to the next data field. the fdc continues this "multi- sector write operation". upon receipt of a terminal count signal or if a fifo over/under run occurs while a data field is being written, then the remainder of the data field is filled with zeros. the fdc reads the id field of each sector and checks the crc bytes. if it detects a crc error in one of the id fields, it sets the ic code in status register 0 to "01" (abnormal termination), sets the de bit of status register 1 to "1", and terminates the write data command. the write data command operates in much the same manner as the read data command. the following items are the same. please refer to the read data command for details: ? transfer capacity ? en (end of cylinder) bit ? nd (no dat a) bit ? head load, unload time interval ? id information when the host terminates the command
66 ? definition of dtl when n = 0 and when n does not = 0 write deleted data this command is almost the same as the write data command except that a deleted data address mark is written at the beginning of the data field instead of the normal data address mark. this command is typically used to mark a bad sector containing an error on the floppy disk. verify the verify command is used to verify the data stored on a disk. this command acts exactly like a read data command except that no data is transferred to the host. data is read from the disk and crc is computed and checked against the previously-stored value. because data is not transferred to the host, tc (pin 35) cannot be used to terminate this command. by setting the ec bit to "1", an implicit tc will be issued to the fdc. this implicit tc will occur when the sc value has decremented to 0 (an sc value of 0 will verify 256 sectors). this command can also be terminated by setting the ec bit to "0" and the eot value equal to the final sector to be checked. if ec is set to "0", dtl/sc should be programmed to 0ffh. refer to table 27 and table 28 for information concerning the values of mt and ec versus sc and eot value. definitions: # sectors per side = number of formatted sectors per each side of the disk. # sectors remaining = number of formatted sectors left which can be read, including side 1 of the disk if mt is set to "1". table 28 - verify command result phase table mt ec sc/eot value termination result 0 0 sc = dtl eot # sectors per side success termination result phase valid 0 0 sc = dtl eot > # sectors per side unsuccessful termination result phase invalid 0 1 sc # sectors remaining and eot # sectors per side successful termination result phase valid 0 1 sc > # sectors remaining or eot > # sectors per side unsuccessful termination result phase invalid 1 0 sc = dtl eot # sectors per side successful termination result phase valid 1 0 sc = dtl eot > # sectors per side unsuccessful termination result phase invalid 1 1 sc # sectors remaining and eot # sectors per side successful termination result phase valid 1 1 sc > # sectors remaining or eot > # sectors per side unsuccessful termination result phase invalid
67 format a track the format command allows an entire track to be formatted. after a pulse from the idx pin is detected, the fdc starts writing data on the disk including gaps, address marks, id fields, and data fields per the ibm system 34 or 3740 format (mfm or fm respectively). the particular values that will be written to the gap and data field are controlled by the values programmed into n, sc, gpl, and d which are specified by the host during the command phase. the data field of the sector is filled with the data byte specified by d. the id field for each sector is supplied by the host; that is, four data bytes per sector are needed by the fdc for c, h, r, and n (cylinder, head, sector number and sector size respectively). after formatting each sector, the host must send new values for c, h, r and n to the fdc for the next sector on the track. the r value (sector number) is the only value that must be changed by the host after each sector is formatted. this allows the disk to be formatted with nonsequential sector addresses (interleaving). this incrementing and formatting continues for the whole track until the fdc encounters a pulse on the idx pin again and it terminates the command. table 29 contains typical values for gap fields which are dependent upon the size of the sector and the number of sectors on each track. actual values can vary due to drive electronics. format fields system 34 (double density) format gap4a 80x 4e sync 12x 00 iam gap1 50x 4e sync 12x 00 idam c y l h d s e c n o c r c gap2 22x 4e sync 12x 00 data am data c r c gap3 gap 4b 3x c2 fc 3x a1 fe 3x a1 fb f8 system 3740 (single density) format gap4a 40x ff sync 6x 00 iam gap1 26x ff sync 6x 00 idam c y l h d s e c n o c r c gap2 11x ff sync 6x 00 data am data c r c gap3 gap 4b fc fe fb or f8 perpendicular format gap4a 80x 4e sync 12x 00 iam gap1 50x 4e sync 12x 00 idam c y l h d s e c n o c r c gap2 41x 4e sync 12x 00 data am data c r c gap3 gap 4b 3x c2 fc 3x a1 fe 3x a1 fb f8
68 table 29 - typical values for formatting format sector size n sc gpl1 gpl2 5.25" drives fm 128 128 512 1024 2048 4096 ... 00 00 02 03 04 05 ... 12 10 08 04 02 01 07 10 18 46 c8 c8 09 19 30 87 ff ff mfm 256 256 512* 1024 2048 4096 ... 01 01 02 03 04 05 ... 12 10 09 04 02 01 0a 20 2a 80 c8 c8 0c 32 50 f0 ff ff 3.5" drives fm 128 256 512 0 1 2 0f 09 05 07 0f 1b 1b 2a 3a mfm 256 512** 1024 1 2 3 0f 09 05 0e 1b 35 36 54 74 gpl1 = suggested gpl values in read and write commands to avoid splice point between data field and id field of contiguous sections. gpl2 = suggested gpl value in format a track command. *pc/at values (typical) **ps/2 values (typical). applies with 1.0 mb and 2.0 mb drives. note: all values except sector size are in hex.
69 control commands control commands differ from the other commands in that no data transfer takes place. three commands generate an interrupt when complete: read id, recalibrate, and seek. the other control commands do not generate an interrupt. read id the read id command is used to find the present position of the recording heads. the fdc stores the values from the first id field it is able to read into its registers. if the fdc does not find an id address mark on the diskette after the second occurrence of a pulse on the nindex pin, it then sets the ic code in status register 0 to "01" (abnormal termination), sets the ma bit in status register 1 to "1", and terminates the command. the following commands will generate an interrupt upon completion. they do not return any result bytes. it is highly recommended that control commands be followed by the sense interrupt status command. otherwise, valuable interrupt status information will be lost. recalibrate this command causes the read/write head within the fdc to retract to the track 0 position. the fdc clears the contents of the pcn counter and checks the status of the ntr0 pin from the fdd. as long as the ntr0 pin is low, the dir pin remains 0 and step pulses are issued. when the ntr0 pin goes high, the se bit in status register 0 is set to "1" and the command is terminated. if the ntr0 pin is still low after 79 step pulses have been issued, the fdc sets the se and the ec bits of status register 0 to "1" and terminates the command. disks capable of handling more than 80 tracks per side may require more than one recalibrate command to return the head back to physical track 0. the recalibrate command does not have a result phase. the sense interrupt status command must be issued after the recalibrate command to effectively terminate it and to provide verification of the head position (pcn). during the command phase of the recalibrate operation, the fdc is in the busy state, but during the execution phase it is in a non-busy state. at this time, another recalibrate command may be issued, and in this manner parallel recalibrate operations may be done on up to four drives at once. upon power up, the software must issue a recalibrate command to properly initialize all drives and the controller. seek the read/write head within the drive is moved from track to track under the control of the seek command. the fdc compares the pcn, which is the current head position, with the ncn and performs the following operation if there is a difference: pcn < ncn: direction signal to drive set to "1" (step in) and issues step pulses. pcn > ncn: direction signal to drive set to "0" (step out) and issues step pulses. the rate at which step pulses are issued is controlled by srt (stepping rate time) in the specify command. after each step pulse is issued, ncn is compared against pcn, and when ncn = pcn the se bit in status register 0 is set to "1" and the command is terminated. during the command phase of the seek or recalibrate operation, the fdc is in the busy state, but during the execution phase it is in the non-busy state. at this time, another seek or recalibrate command may be issued, and in this manner, parallel seek operations may be done on up to four drives at once.
70 note that if implied seek is not enabled, the read and write commands should be preceded by: 1) seek command - step to the proper track 2) sense interrupt status command - terminate the seek command 3) read id - verify head is on proper track 4) issue read/write command. the seek command does not have a result phase. therefore, it is highly recommended that the sense interrupt status command be issued after the seek command to terminate it and to provide verification of the head position (pcn). the h bit (head address) in st0 will always return to a "0". when exiting powerdown mode, the fdc clears the pcn value and the status information to zero. prior to issuing the powerdown command, it is highly recommended that the user service all pending interrupts through the sense interrupt status command. sense interrupt status an interrupt signal on fint pin is generated by the fdc for one of the following reasons: 1. upon entering the result phase of: a. read data command b. read a track command c. read id command d. read deleted data command e. write data command f. format a track command g. write deleted data command h. verify command 2. end of seek, relative seek, or recalibrate command 3. fdc requires a data transfer during the execution phase in the non-dma mode the sense interrupt status command resets the interrupt signal and, via the ic code and se bit of status register 0, identifies the cause of the interrupt. table 30 - interrupt identification the seek, relative seek, and recalibrate commands have no result phase. the sense interrupt status command must be issued immediately after these commands to terminate them and to provide verification of the head position (pcn). the h (head address) bit in st0 will always return a "0". if a sense interrupt status is not issued, the drive will continue to be busy and may affect the operation of the next command. sense drive status sense drive status obtains drive status information. it has not execution phase and goes directly to the result phase from the command phase. status register 3 contains the drive status information. specify the specify command sets the initial values for each of the three internal times. the hut (head unload time) defines the time from the end of the execution phase of one of the read/write commands to the head unload state. the srt (step rate time) defines the time interval between adjacent step pulses. note that the spacing between the first and second step pulses may be shorter than the remaining step pulses. the hlt (head load time) defines se ic interrupt due to 0 1 1 11 00 01 polling normal termination of seek or recalibrate command abnormal termination of seek or recalibrate command
71 the time between when the head load signal goes high and the read/write operation starts. the values change with the data rate speed selection and are documented in table 31. the values are the same for mfm and fm. table 31 - drive control delays (ms) hut srt 1m 500k 300k 250k 1m 500k 300k 250k 0 1 .. e f 128 8 .. 112 120 256 16 .. 224 240 426 26.7 .. 373 400 512 32 .. 448 480 8.0 7.5 .. 1.0 0.5 16 15 .. 2 1 26.7 25 .. 3.33 1.67 32 30 .. 4 2 hlt 1m 500k 300k 250k 00 01 02 .. 7f 7f 128 1 2 .. 126 127 256 2 4 .. 252 254 426 3.3 6.7 .. 420 423 512 4 8 . 504 508 the choice of dma or non-dma operations is made by the nd bit. when this bit is "1", the non-dma mode is selected, and when nd is "0", the dma mode is selected. in dma mode, data transfers are signalled by the fdrq pin. non- dma mode uses the rqm bit and the fint pin to signal data transfers. configure the configure command is issued to select the special features of the fdc. a configure command need not be issued if the default values of the fdc meet the system requirements. configure default values: eis - no implied seeks efifo - fifo disabled poll - polling enabled fifothr - fifo threshold set to 1 byte pretrk - pre-compensation set to track 0 eis - enable implied seek. when set to "1", the fdc will perform a seek operation before executing a read or write command. defaults to no implied seek. efifo - a "1" disables the fifo (default). this means data transfers are asked for on a byte- by-byte basis. defaults to "1", fifo disabled. the threshold defaults to "1". poll - disable polling of the drives. defaults to "0", polling enabled. when enabled, a single interrupt is generated after a reset. no polling is performed while the drive head is loaded and the head unload delay has not expired. fifothr - the fifo threshold in the execution phase of read or write commands. this is programmable from 1 to 16 bytes. defaults to one byte. a "00" selects one byte; "0f" selects 16 bytes.
72 pretrk - pre-compensation start track number. programmable from track 0 to 255. defaults to track 0. a "00" selects track 0; "ff" selects track 255. version the version command checks to see if the controller is an enhanced type or the older type (765a). a value of 90 h is returned as the result byte. relative seek the command is coded the same as for seek, except for the msb of the first byte and the dir bit. dir head step direction control rcn relative cylinder number that determines how many tracks to step the head in or out from the current track number. the relative seek command differs from the seek command in that it steps the head the absolute number of tracks specified in the command instead of making a comparison against an internal register. the seek command is good for drives that support a maximum of 256 tracks. relative seeks cannot be overlapped with other relative seeks. only one relative seek can be active at a time. relative seeks may be overlapped with seeks and recalibrates. bit 4 of status register 0 (ec) will be set if relative seek attempts to step outward beyond track 0. as an example, assume that a floppy drive has 300 useable tracks. the host needs to read track 300 and the head is on any track (0-255). if a seek command is issued, the head will stop at track 255. if a relative seek command is issued, the fdc will move the head the specified number of tracks, regardless of the internal cylinder position register (but will increment the register). if the head was on track 40 (d), the maximum track that the fdc could position the head on using relative seek will be 295 (d), the initial track + 255 (d). the maximum count that the head can be moved with a single relative seek command is 255 (d). the internal register, pcn, will overflow as the cylinder number crosses track 255 and will contain 39 (d). the resulting pcn value is thus (rcn + pcn) mod 256. functionally, the fdc starts counting from 0 again as the track number goes above 255 (d). it is the user's responsibility to compensate fdc functions (precompensation track number) when accessing tracks greater than 255. the fdc does not keep track that it is working in an "extended track area" (greater than 255). any command issued will use the current pcn value except for the recalibrate command, which only looks for the track0 signal. recalibrate will return an error if the head is farther than 79 due to its limitation of issuing a maximum of 80 step pulses. the user simply needs to issue a second recalibrate command. the seek command and implied seeks will function correctly within the 44 (d) track (299-255) area of the "extended track area". it is the user's responsibility not to issue a new track position that will exceed the maximum track that is present in the extended area. to return to the standard floppy range (0-255) of tracks, a relative seek should be issued to cross the track 255 boundary. a relative seek can be used instead of the normal seek, but the host is required to calculate the difference between the current head location and the new (target) head location. this may require the host to issue a read id command to ensure that the head is physically on the track that software assumes it dir action 0 1 step head out step head in
73 to be. different fdc commands will return different cylinder results which may be difficult to keep track of with software without the read id command. perpendicular mode the perpendicular mode command should be issued prior to executing read/write/format commands that access a disk drive with perpendicular recording capability. with this command, the length of the gap2 field and vco enable timing can be altered to accommodate the unique requirements of these drives. table 31 describes the effects of the wgate and gap bits for the perpendicular mode command. upon a reset, the fdc will default to the conventional mode (wgate = 0, gap = 0). selection of the 500 kbps and 1 mbps perpendicular modes is independent of the actual data rate selected in the data rate select register. the user must ensure that these two data rates remain consistent. the gap2 and vco timing requirements for perpendicular recording type drives are dictated by the design of the read/write head. in the design of this head, a pre-erase head precedes the normal read/write head by a distance of 200 micrometers. this works out to about 38 bytes at a 1 mbps recording density. whenever the write head is enabled by the write gate signal, the pre-erase head is also activated at the same time. thus, when the write head is initially turned on, flux transitions recorded on the media for the first 38 bytes will not be preconditioned with the pre-erase head since it has not yet been activated. to accommodate this head activation and deactivation time, the gap2 field is expanded to a length of 41 bytes. the format field shown on page 67 illustrates the change in the gap2 field size for the perpendicular format. on the read back by the fdc, the controller must begin synchronization at the beginning of the sync field. for the conventional mode, the internal pll vco is enabled (vcoen) approximately 24 bytes from the start of the gap2 field. but, when the controller operates in the 1 mbps perpendicular mode (wgate = 1, gap = 1), vcoen goes active after 43 bytes to accommodate the increased gap2 field size. for both cases, and approximate two-byte cushion is maintained from the beginning of the sync field for the purposes of avoiding write splices in the presence of motor speed variation. for the write data case, the fdc activates write gate at the beginning of the sync field under the conventional mode. the controller then writes a new sync field, data address mark, data field, and crc as shown on page 67. with the pre-erase head of the perpendicular drive, the write head must be activated in the gap2 field to insure a proper write of the new sync field. for the 1 mbps perpendicular mode (wgate = 1, gap = 1), 38 bytes will be written in the gap2 space. since the bit density is proportional to the data rate, 19 bytes will be written in the gap2 field for the 500 kbps perpendicular mode (wgate = 1, gap =0). it should be noted that none of the alterations in gap2 size, vco timing, or write gate timing affect normal program flow. the information provided here is just for background purposes and is not needed for normal operation. once the perpendicular mode command is invoked, fdc software behavior from the user standpoint is unchanged. the perpendicular mode command is enhanced to allow specific drives to be designated perpendicular recording drives. this enhancement allows data transfers between conventional and perpendicular drives without having to issue perpendicular mode commnds between the accesses of the different drive
74 types, nor having to change write pre- compensation values. when both gap and wgate bits of the perpendicular mode command are both programmed to "0" (conventional mode), then d0, d1, d2, d3, and d4 can be programmed independently to "1" for that drive to be set automatically to perpendicular mode. in this mode the following set of conditions also apply: 1. the gap2 written to a perpendicular drive during a write operation will depend upon the programmed data rate. 2. the write pre-compensation given to a perpendicular mode drive will be 0ns. 3. for d0-d3 programmed to "0" for conventional mode drives any data written will be at the currently programmed write pre-compensation. note: bits d0-d3 can only be overwritten when ow is programmed as a "1". if either gap or wgate is a "1" then d0-d3 are ignored. software and hardware resets have the following effect on the perpendicular mode command: 1. "software" resets (via the dor or dsr registers) will only clear gap and wgate bits to "0". d0-d3 are unaffected and retain their previous value. 2. "hardware" resets will clear all bits ( gap, wgate and d0-d3) to "0", i.e all conventional mode. table 32 - effects of wgate and gap bits wgate gap mode length of gap2 format field portion of gap 2 written by write data operation 0 0 1 1 0 1 0 1 conventional perpendicular (500 kbps) reserved (conventional) perpendicular (1 mbps) 22 bytes 22 bytes 22 bytes 41 bytes 0 bytes 19 bytes 0 bytes 38 bytes lock in order to protect systems with long dma latencies against older application software that can disable the fifo the lock command has been added. this command should only be used by the fdc routines, and application software should refrain from using it. if an application calls for the fifo to be disabled then the configure command should be used. the lock command defines whether the efifo, fifothr, and pretrk parameters of the configure command can be reset by the dor and dsr registers. when the lock bit is set to logic "1" all subsequent "software resets by the dor and dsr registers will not change the previously set parameters to their default values. all "hardware" reset from the reset pin will set the lock bit to logic "0" and return the efifo, fifothr, and pretrk to their default values. a status byte is returned immediately after issuing a a lock command.
75 this byte reflects the value of the lock bit set by the command byte. enhanced dumpreg the dumpreg command is designed to support system run-time diagnostics and application software development and debug. to accommodate the lock command and the enhanced perpendicular mode command the eighth byte of the dumpreg command has been modified to contain the additional data from these two commands. compatibility the FDC37C665GT/666gt was designed with software compatibility in mind. it is a fully backwards- compatible solution with the older generation 765a/b disk controllers. the fdc also implements on-board registers for compatibility with the ps/2, as well as pc/at and pc/xt, floppy disk controller subsystems. after a hardware reset of the fdc, all registers, functions and enhancements default to a pc/at, ps/2 or ps/2 model 30 compatible operating mode, depending on how the ident and mfm bits are configured by the system bios.
76 parallel port floppy disk controller in this mode, the floppy disk control signals are available on the parallel port pins. when this mode is selected, the parallel port is not available. there are two modes of operation, ppfd1 and ppfd2. these modes can be selected in configuration register 4. ppfd1 has only drive 1 on the parallel port pins; ppfd2 has drive 0 and 1 on the parallel port pins. ppfd1: drive 0 is on the fdc pins drive 1 is on the parallel port pins drive 2 is on the fdc pins* drive 3 is on the fdc pins* ppfd2: drive 0 is on the parallel port pins drive 1 is on the parallel port pins drive 2 is on the fdc pins* drive 3 is on the fdc pins* * if ecp is selected, then direct support for drives 2 and 3 is not available. drives 2 and 3 are available using external decoders. when the ppfdc is selected the following pins are set as follows: 1. nds2/pdir (pin 98): not ecp = high-z, ecp = high 2. a10/nds3 (pin 97): high-z, a10 = to internal logic. 3. nmtr2/npdack (pin 96): high-z 4. nmtr3/pdrq (pin 99): not ecp = high-z, ecp & dmaen = 0, ecp & not dmaen = high-z 5. pintr: not active, this is hi-z or low depending on settings. the following parallel port pins are read as follows by a read of the parallel port register: 1. data register (read) = last data register (write) 2. control register are read as "cable not connected" strobe, autofd and slc = 0 and ninit = 1; 3. status register reads: nbusy = 0, pe = 0, slct = 0, nack = 1, nerr = 1. the following fdc pins are all in the high impedence state when the ppfdc is actually selected by the drive select register: 1. nwdata, densel, nhdsel, nwgate, ndir, nstep, nds1, nds0, nmtro, nmtr1. 2. if ppfdx is selected, then the parallel port can not be used as a parallel port until "normal" mode is selected. the fdc signals are muxed onto the parallel port pins as shown in table 33:
77 table 33 - fdc parallel port pins connector pin # chip pin # spp mode pin direction fdc mode pin direction 1 77 nstb i/o (nds0) (0)* 2 71 pd0 i/o nindex i 3 70 pd1 i/o ntrk0 i 4 69 pd2 i/o nwp i 5 68 pd3 i/o nrdata i 6 66 pd4 i/o ndskchg i 7 65 pd5 i/o msen0 i 8 64 pd6 i/o (nmtr0) (0)* 9 63 pd7 i/o msen1 i 10 62 nack i nds1 0 11 61 busy i nmtr1 0 12 60 pe i nwdata 0 13 59 slct i nwgate 0 14 76 nafd i/o densel 0 15 75 nerr i nhdsel 0 16 74 ninit i/o ndir 0 17 73 nslin i/o nstep 0 *these pins are outputs in mode ppfd2; nc in mode ppfd1.
78 serial port (uart) the FDC37C665GT and fdc37c666gt incorporate two full function uarts. they are compatible with the ns16450, the 16450 ace registers and the ns16550a. the uarts perform serial-to-parallel conversion on received characters and parallel-to-serial conversion on transmit characters. the data rates are independently programmable from 115.2k baud down to 50 baud. the character options are programmable for 1 start; 1, 1.5 or 2 stop bits; even, odd, sticky or no parity; and prioritized interrupts. the uarts each contain a programmable baud rate generator that is capable of dividing the input clock or crystal by a number from 1 to 65535. the uarts are also capable of supporting the midi data rate. refer to the FDC37C665GT configuration registers and the fdc37c666gt hardware configuration description for information on disabling, power down and changing the base address of the uarts. the interrupt from a uart is enabled by programming out2 of that uart to a logic "1". out2 being a logic "0" disables that uart's interrupt. register description addressing of the accessible registers of the serial port is shown below. the base addresses of the serial ports are defined by the configuration registers (see configuration section). the serial port registers are located at sequentially increasing addresses above these base addresses. the FDC37C665GT/666gt contains two serial ports, each of which contain a register set as described below. table 34 - addressing the serial port dlab* a2 a1 a0 register name 0 0 0 0 receive buffer (read) 0 0 0 0 transmit buffer (write) 0 0 0 1 interrupt enable (read/write) x 0 1 0 interrupt identification (read) x 0 1 0 fifo control (write) x 0 1 1 line control (read/write) x 1 0 0 modem control (read/write) x 1 0 1 line status (read/write) x 1 1 0 modem status (read/write) x 1 1 1 scratchpad (read/write) 1 0 0 0 divisor lsb (read/write) 1 0 0 1 divisor msb (read/write *note: dlab is bit 7 of the line control register
79 the following section describes the operation of the registers. receive buffer register (rb) address offset = 0h, dlab = 0, read only this register holds the received incoming data byte. bit 0 is the least significant bit, which is transmitted and received first. received data is double buffered; this uses an additional shift register to receive the serial data stream and convert it to a parallel 8 bit word which is transferred to the receive buffer register. the shift register is not accessible. transmit buffer register (tb) address offset = 0h, dlab = 0, write only this register contains the data byte to be transmitted. the transmit buffer is double buffered, utilizing an additional shift register (not accessible) to convert the 8 bit data word to a serial format. this shift register is loaded from the transmit buffer when the transmission of the previous byte is complete. interrupt enable register (ier) address offset = 1h, dlab = 0, read/write the lower four bits of this register control the enables of the five interrupt sources of the serial port interrupt. it is possible to totally disable the interrupt system by resetting bits 0 through 3 of this register. similarly, setting the appropriate bits of this register to a high, selected interrupts can be enabled. disabling the interrupt system inhibits the interrupt identification register and disables any serial port interrupt out of the fdc37c665. all other system functions operate in their normal manner, including the line status and modem status registers. the contents of the interrupt enable register are described below. bit 0 this bit enables the received data available interrupt (and timeout interrupts in the fifo mode) when set to logic "1". bit 1 this bit enables the transmitter holding register empty interrupt when set to logic "1". bit 2 this bit enables the received line status interrupt when set to logic "1". the error sources causing the interrupt are overrun, parity, framing and break. the line status register must be read to determine the source. bit 3 this bit enables the modem status interrupt when set to logic "1". this is caused when one of the modem status register bits changes state. bits 4 through 7 these bits are always logic "0". fifo control register (fcr) address offset = 2h, dlab = x, write this is a write only register at the same location as the iir. this register is used to enable and clear the fifo's, set the rcvr fifo trigger level. note: dma is not supported. bit 0 setting this bit to a logic "1" enables both the xmit and rcvr fifo's. clearing this bit to a logic "0" disables both the xmit and rcvr fifo's and clears all bytes from both fifo's. when changing from fifo mode to non-fifo (16450) mode, data is automatically cleared from the fifo's. this bit must be a 1 when other bits in this register are written to or they will not be properly programmed. bit 1 setting this bit to a logic "1" clears all bytes in the rcvr fifo and resets its counter logic to 0. the shift register is not cleared. this bit is self- clearing.
80 bit 2 setting this bit to a logic "1" clears all bytes in the xmit fifo and resets its counter logic to 0. the shift register is not cleared. this bit is self- clearing. bit 3 writting to this bit has no effect on the operation of the uart. the rxrdy and txrdy pins are not available on this chip. bit 4,5 reserved bit 6,7 these bits are used to set the trigger level for the rcvr fifo interrupt. interrupt identification register (iir) address offset = 2h, dlab = x, read by accessing this register, the host cpu can determine the highest priority interrupt and its source. four levels of priority interrupt exist. they are in descending order of priority: 1. receiver line status (highest priority) 2. received d ata ready 3. transmitter holding register empty 4. modem status (lowest priority) information indicating that a prioritized interrupt is pending and the source of that interrupt is stored in the interrupt identification register (refer to interrupt control table). when the cpu accesses the iir, the serial port freezes all interrupts and indicates the highest priority pending interrupt to the cpu. during this cpu access, even if the serial port records new interrupts, the current indication does not change until access is completed. the contents of the iir are described below. bit 0 this bit can be used in either a hardwired prioritized or polled environment to indicate whether an interrupt is pending. when bit 0 is a logic "0", an interrupt is pending and the contents of the iir may be used as a pointer to the appropriate internal service routine. when bit 0 is a logic "1", no interrupt is pending. bits 1 and 2 these two bits of the iir are used to identify the highest priority interrupt pending as indicated by the interrupt control table. bit 3 in non-fifo mode, this bit is a logic "0". in fifo mode this bit is set along with bit 2 when a timeout interrupt is pending. bits 4 and 5 these bits of the iir are always logic "0". bits 6 and 7 these two bits are set when the fifo control register bit 0 equals 1. bit 7 bit 6 rcvr fifo trigger level (bytes) 0 0 1 0 1 4 1 0 8 1 1 14
81 table 35 - interrupt control table fifo mode only interrupt identification register interrupt set and reset functions bit 3 bit 2 bit 1 bit 0 priorit y level interrupt type interrupt source interrupt reset control 0 0 0 1 - none none - 0 1 1 0 highest receiver line status overrun error, parity error, framing error or break interrupt reading the line status register 0 1 0 0 second received data available receiver data available read receiver buffer or the fifo drops below the trigger level. 1 1 0 0 second character timeout indication no characters have been removed from or input to the rcvr fifo during the last 4 char times and there is at least 1 char in it during this time reading the receiver buffer register 0 0 1 0 third transmitter holding register empty transmitter holding register empty reading the iir register (if source of interrupt) or writing the transmitter holding register 0 0 0 0 fourth modem status clear to send or data set ready or ring indicator or data carrier detect reading the modem status register
82 line control register (lcr) address offset = 3h, dlab = 0, read/write this register contains the format information of the serial line. the bit definitions are: bits 0 and 1 these two bits specify the number of bits in each transmitted or received serial character. the encoding of bits 0 and 1 is as follows: the start, stop and parity bits are not included in the word length. bit 2 this bit specifies the number of stop bits in each transmitted or received serial character. the following table summarizes the information. note: the receiver will ignore all stop bits beyond the first, regardless of the number used in transmitting. bit 3 parity enable bit. when bit 3 is a logic "1", a parity bit is generated (transmit data) or checked (receive data) between the last data word bit and the first stop bit of the serial data. (the parity bit is used to generate an even or odd number of 1s when the data word bits and the parity bit are summed). bit 4 even parity select bit. when bit 3 is a logic "1" and bit 4 is a logic "0", an odd number of logic "1"'s is transmitted or checked in the data word bits and the parity bit. when bit 3 is a logic "1" and bit 4 is a logic "1" an even number of bits is transmitted and checked. bit 5 stick parity bit. when bit 3 is a logic "1" and bit 5 is a logic "1", the parity bit is transmitted and then detected by the receiver in the opposite state indicated by bit 4. bit 6 set break control bit. when bit 6 is a logic "1", the transmit data output (txd) is forced to the spacing or logic "0" state and remains there (until reset by a low level bit 6) regardless of other transmitter activity. this feature enables the serial port to alert a terminal in a communications system. bit 7 divisor latch access bit (dlab). it must be set high (logic "1") to access the divisor latches of the baud rate generator during read or write operations. it must be set low (logic "0") to access the receiver buffer register, the transmitter holding register, or the interrupt enable register. modem control register (mcr) address offset = 4h, dlab = x, read/write this 8 bit register controls the interface with the modem or data set (or device emulating a modem). the contents of the modem control register are described below. bit 1 bit 0 word length 0 0 1 1 0 1 0 1 5 bits 6 bits 7 bits 8 bits bit 2 word length number of stop bits 0 -- 1 1 5 bits 1.5 1 6 bits 2 1 7 bits 2 1 8 bits 2
83 bit 0 this bit controls the data terminal ready (ndtr) output. when bit 0 is set to a logic "1", the ndtr output is forced to a logic "0". when bit 0 is a logic "0", the ndtr output is forced to a logic "1". bit 1 this bit controls the request to send (nrts) output. bit 1 affects the nrts output in a manner identical to that described above for bit 0. bit 2 this bit controls the output 1 (out1) bit. this bit does not have an output pin and can only be read or written by the cpu. bit 3 output 2 (out2). this bit is used to enable an uart interrupt. when out2 is a logic "0", the serial port interrupt output is forced to a high impedance state - disabled. when out2 is a logic "1", the serial port interrupt outputs are enabled. bit 4 this bit provides the loopback feature for diagnostic testing of the serial port. when bit 4 is set to logic "1", the following occur: 1. the txd is set to the marking state(logic "1"). 2. the receiver serial input (rxd) is disconnected. 3. the output of the transmitter shift register is "looped back" into the receiver shift register input. 4. all modem control input s (ncts, ndsr, nri and ndcd) are disconnected. 5. the four modem control outputs (ndtr, nrts, and out2) are internally connected to the four modem control inputs. 6. the modem control output pins are forced inactive high. 7. data that is transmitted is immediately received. this feature allows the processor to verify the transmit and receive data paths of the serial port. in the diagnostic mode, the receiver and the transmitter interrupts are fully operational. the modem control interrupts are also operational but the interrupts' sources are now the lower four bits of the modem control register instead of the modem control inputs. the interrupts are still controlled by the interrupt enable register. bits 5 through 7 these bits are permanently set to logic zero. line status register (lsr) address offset = 5h, dlab = x, read/write bit 0 data ready (dr). it is set to a logic "1" whenever a complete incoming character has been received and transferred into the receiver buffer register or the fifo. bit 0 is reset to a logic "0" by reading all of the data in the receive buffer register or the fifo. bit 1 overrun error (oe). bit 1 indicates that data in the receiver buffer register was not read before the next character was transferred into the register, thereby destroying the previous character. in fifo mode, an overrun error will occur only when the fifo is full and the next character has been completely received in the shift register, the character in the shift register is overwritten but not transferred to the fifo. the oe indicator is set to a logic "1" immediately upon detection of an overrun condition, and reset whenever the line status register is read. bit 2 parity error (pe). bit 2 indicates that the received data character does not have the correct even or odd parity, as selected by the even parity select bit. the pe is set to a logic "1" upon detection of a parity error and is reset to a logic "0" whenever the line status register is read. in the fifo mode this error is
84 associated with the particular character in the fifo it applies to. this error is indicated when the associated character is at the top of the fifo. bit 3 framing error (fe). bit 3 indicates that the received character did not have a valid stop bit. bit 3 is set to a logic "1" whenever the stop bit following the last data bit or parity bit is detected as a zero bit (spacing level). the fe is reset to a logic "0" whenever the line status register is read. in the fifo mode this error is associated with the particular character in the fifo it applies to. this error is indicated when the associated character is at the top of the fifo. the serial port will try to resynchronize after a framing error. to do this, it assumes that the framing error was due to the next start bit, so it samples this 'start' bit twice and then takes in the 'data'. bit 4 break interrupt (bi). bit 4 is set to a logic "1" whenever the received data input is held in the spacing state (logic "0") for longer than a full word transmission time (that is, the total time of the start bit + data bits + parity bits + stop bits). the bi is reset after the cpu reads the contents of the line status register. in the fifo mode this error is associated with the particular character in the fifo it applies to. this error is indicated when the associated character is at the top of the fifo. when break occurs only one zero character is loaded into the fifo. restarting after a break is received, requires the serial data (rxd) to be logic "1" for at least 1/2 bit time. note: bits 1 through 4 are the error conditions that produce a receiver line status interrupt whenever any of the corresponding conditions are detected and the interrupt is enabled. bit 5 transmitter holding register empty (thre). bit 5 indicates that the serial port is ready to accept a new character for transmission. in addition, this bit causes the serial port to issue an interrupt when the transmitter holding register interrupt enable is set high. the thre bit is set to a logic "1" when a character is transferred from the transmitter holding register into the transmitter shift register. the bit is reset to logic "0" whenever the cpu loads the transmitter holding register. in the fifo mode this bit is set when the xmit fifo is empty, it is cleared when at least 1 byte is written to the xmit fifo. bit 5 is a read only bit. bit 6 transmitter empty (temt). bit 6 is set to a logic "1" whenever the transmitter holding register (thr) and transmitter shift register (tsr) are both empty. it is reset to logic "0" whenever either the thr or tsr contains a data character. bit 6 is a read only bit. in the fifo mode this bit is set whenever the thr and tsr are both empty, bit 7 this bit is permanently set to logic "0" in the 450 mode. in the fifo mode, this bit is set to a logic "1" when there is at least one parity error, framing error or break indication in the fifo. this bit is cleared when the lsr is read if there are no subsequent errors in the fifo. modem status register (msr) address offset = 6h, dlab = x, read/write this 8 bit register provides the current state of the control lines from the modem (or peripheral device). in addition to this current state information, four bits of the modem status register (msr) provide change information. these bits are set to logic "1" whenever a control input from the modem changes state. they are reset to logic "0" whenever the modem status register is read.
85 bit 0 delta clear to send (dcts). bit 0 indicates that the ncts input to the chip has changed state since the last time the msr was read. bit 1 delta data set ready (ddsr). bit 1 indicates that the ndsr input has changed state since the last time the msr was read. bit 2 trailing edge of ring indicator (teri). bit 2 indicates that the nri input has changed from logic "0" to logic "1". bit 3 delta data carrier detect (ddcd). bit 3 indicates that the ndcd input to the chip has changed state. note: whenever bit 0, 1, 2, or 3 is set to a logic "1", a modem status interrupt is generated. bit 4 this bit is the complement of the clear to send (ncts) input. if bit 4 of the mcr is set to logic "1", this bit is equivalent to nrts in the mcr. bit 5 this bit is the complement of the data set ready (ndsr) input. if bit 4 of the mcr is set to logic "1", this bit is equivalent to dtr in the mcr. bit 6 this bit is the complement of the ring indicator (nri) input. if bit 4 of the mcr is set to logic "1", this bit is equivalent to out1 in the mcr. bit 7 this bit is the complement of the data carrier detect (ndcd) input. if bit 4 of the mcr is set to logic "1", this bit is equivalent to out2 in the mcr. scratchpad register (scr) address offset =7h, dlab =x, read/write this 8 bit read/write register has no effect on the operation of the serial port. it is intended as a scratchpad register to be used by the programmer to hold data temporarily. programmable baud rate generator (and divisor latches dlh, dll) the serial port contains a programmable baud rate generator that is capable of taking any clock input (dc to 3 mhz) and dividing it by any divisor from 1 to 65535. this output frequency of the baud rate generator is 16x the baud rate. two 8 bit latches store the divisor in 16 bit binary format. these divisor latches must be loaded during initialization in order to insure desired operation of the baud rate generator. upon loading either of the divisor latches, a 16 bit baud counter is immediately loaded. this prevents long counts on initial load. if a 0 is loaded into the brg registers the output divides the clock by the number 3. if a 1 is loaded the output is the inverse of the input oscillator. if a two is loaded the output is a divide by 2 signal with a 50% duty cycle. if a 3 or greater is loaded the output is low for 2 bits and high for the remainder of the count. the input clock to the brg is the 24 mhz crystal divided by 13, giving a 1.8462 mhz clock. table 36 shows the baud rates possible with a 1.8462 mhz crystal. effect of the reset on register file the reset function table (table 37) details the effect of the reset input on each of the registers of the serial port.
86 fifo interrupt mode operation when the rcvr fifo and receiver interrupts are enabled (fcr bit 0 = "1", ier bit 0 = "1"), rcvr interrupts occur as follows: a. the receive data available interrupt will be issued when the fifo has reached its programmed trigger level; it is cleared as soon as the fifo drops below its programmed trigger level. b. the iir receive data available indication also occurs when the fifo trigger level is reached. it is cleared when the fifo drops below the trigger level. c. the receiver line status interrupt (iir=06h), has higher priority than the received data available (iir=04h) interrupt. d. the data ready bit (lsr bit 0)is set as soon as a character is transferred from the shift register to the rcvr fifo. it is reset when the fifo is empty. when rcvr fifo and receiver interrupts are enabled, rcvr fifo timeout interrupts occur as follows: a. a fifo timeout interrupt occurs if all the following conditions exist: - at least one character is in the fifo - the most recent serial character received was longer than 4 continuous character times ago. (if 2 stop bits are programmed, the second one is included in this time delay.) - the most recent cpu read of the fifo was longer than 4 continuous character times ago. this will cause a maximum character received to interrupt issued delay of 160 msec at 300 baud with a 12 bit character. b. character times are calculated by using the rclk input for a clock signal (this makes the delay proportional to the baudrate). c. when a timeout interrupt has occurred it is cleared and the timer reset when the cpu reads one character from the rcvr fifo. d. when a timeout interrupt has not occurred the timeout timer is reset after a new character is received or after the cpu reads the rcvr fifo. when the xmit fifo and transmitter interrupts are enabled (fcr bit 0 = "1", ier bit 1 = "1"), xmit interrupts occur as follows: a. the transmitter holding register interrupt (02h) occurs when the xmit fifo is empty; it is cleared as soon as the transmitter holding register is written to (1 of 16 characters may be written to the xmit fifo while servicing this interrupt) or the iir is read. b. the transmitter fifo empty indications will be delayed 1 character time minus the last stop bit time whenever the following occurs: thre=1 and there have not been at least two bytes at the same time in the transmitte fifo since the last thre=1. the transmitter interrupt after changing fcr0 will be immediate, if it is enabled. character timeout and rcvr fifo trigger level interrupts have the sme priority as the current received data available interrupt; xmit fifo empty has the same priority as the current transmitter holding register empty interrupt. fifo polled mode operation with fcr bit 0 = "1" resetting ier bits 0, 1, 2 or 3 or all to zero puts the uart in the fifo polled mode of operation. since the rcvr and xmitter are controlled separately, either one or both can be in the polled mode of operation.
87 in this mode, the user's program will check rcvr and xmitter status via the lsr. lsr definitions for the fifo polled mode are as follows: bit 0=1 as long as there is one byte in the rcvr fifo. bits 1 to 4 specify which error(s) have occurred. character error status is handled the same way as when in the interrupt mode, the iir is not affected since eir bit 2=0. bit 5 indicates when the xmit fifo is empty. bit 6 indicates that both the xmit fifo and shift register are empty. bit 7 indicates whether there are any errors in the rcvr fifo. there is no trigger level reached or timeout condition indicated in the fifo polled mode, however, the rcvr and xmit fifo's are still fully capable of holding characters. table 36 - baud rates using 1.8462 mhz clock (24 mhz/13) desired baud rate divisor used to generate 16x clock percent error difference between desired and actual* 50 2304 0.001 75 1536 - 110 1047 - 134.5 857 0.004 150 768 - 300 384 - 600 192 - 1200 96 - 1800 64 - 2000 58 0.005 2400 48 - 3600 32 - 4800 24 - 7200 16 - 9600 12 - 19200 6 - 38400 3 0.030 57600 2 0.16 115200 1 0.16 *note: the percentage error for all baud rates, except where indicated otherwise, is 0.2%.
88 table 37 - reset function table register/signal reset control reset state interrupt enable register reset all bits low interrupt identification reg. reset bit 0 is high; bits 1 thru 7 low fifo control reset all bits low line control reg. reset all bits low modem control reg. reset all bits low line status reg. reset all bits low except 5, 6 high modem status reg. reset bits 0 - 3 low; bits 4 - 7 input txd1, txd2 reset high intrpt (rcvr errs) reset/read lsr low intrpt (rcvr data ready) reset/read rbr low intrpt (thre) reset/readiir/write thr low out2b reset high rtsb reset high dtrb reset high out1b reset high rcvr fifo reset/fcr1*fcr0/_fcr0 all bits low xmit fifo reset/fcr1*fcr0/_fcr0 all bits low
89 table 38 - register summary for an individual uart channel register address* register name register symbol bit 0 bit 1 addr = 0 dlab = 0 receive buffer register (read only) rbr data bit 0 (note 1) data bit 1 addr = 0 dlab = 0 transmitter holding register (write only) thr data bit 0 data bit 1 addr = 1 dlab = 0 interrupt enable register ier enable received data available interrupt (erdai) enable transmitter holding register empty interrupt (ethrei) addr = 2 interrupt ident. register (read only) iir "0" if interrupt pending interrupt id bit addr = 2 fifo control register (write only) fcr fifo enable rcvr fifo reset addr = 3 line control register lcr word length select bit 0 (wls0) word length select bit 1 (wls1) addr = 4 modem control register mcr data terminal ready (dtr) request to send (rts) addr = 5 line status register lsr data ready (dr) overrun error (oe) addr = 6 modem status register msr delta clear to send (dcts) delta data set ready (ddsr) addr = 7 scratch register (note 4) scr bit 0 bit 1 addr = 0 dlab = 1 divisor latch (ls) ddl bit 0 bit 1 addr = 1 dlab = 1 divisor latch (ms) dlm bit 8 bit 9 *dlab is bit 7 of the line control register (addr = 3). note 1: bit 0 is the least significant bit. it is the first bit serially transmitted or received. note 2: when operating in the xt mode, this bit will be set any time that the transmitter shift register is empty.
90 table 38 - register summary for an individual uart channel (continued) bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 data bit 2 data bit 3 data bit 4 data bit 5 data bit 6 data bit 7 data bit 2 data bit 3 data bit 4 data bit 5 data bit 6 data bit 7 enable receiver line status interrupt (elsi) enable modem status interrupt (emsi) 0 0 0 0 interrupt id bit interrupt id bit (note 5) 0 0 fifos enabled (note 5) fifos enabled (note 5) xmit fifo reset dma mode select (note 6) reserved reserved rcvr trigger lsb rcvr trigger msb number of stop bits (stb) parity enable (pen) even parity select (eps) stick parity set break divisor latch access bit (dlab) out1 (note 3) out2 (note 3) loop 0 0 0 parity error (pe) framing error (fe) break interrupt (bi) transmitter holding register (thre) transmitter empty (temt) (note 2) error in rcvr fifo (note 5) trailing edge ring indicator (teri) delta data carrier detect (ddcd) clear to send (cts) data set ready (dsr) ring indicator (ri) data carrier detect (dcd) bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 10 bit 11 bit 12 bit 13 bit 14 bit 15 note 3: this bit no longer has a pin associated with it. note 4: when operating in the xt mode, this register is not available. note 5: these bits are always zero in the non-fifo mode. note 6: writing a one to this bit has no effect. dma modes are not supported in this chip.
91 notes on serial port operation fifo mode operation: general the rcvr fifo will hold up to 16 bytes regardless of which trigger level is selected. tx and rx fifo operation the tx portion of the uart transmits data through txd as soon as the cpu loads a byte into the tx fifo. the uart will prevent loads to the tx fifo if it currently holds 16 characters. loading to the tx fifo will again be enabled as soon as the next character is transferred to the tx shift register. these capabilities account for the largely autonomous operation of the tx. the uart starts the above operations typically with a tx interrupt. the chip issues a tx interrupt whenever the tx fifo is empty and the tx interrupt is enabled, except in the following instance. assume that the tx fifo is empty and the cpu starts to load it. when the first byte enters the fifo the tx fifo empty interrupt will transition from active to inactive. depending on the execution speed of the service routine software, the uart may be able to transfer this byte from the fifo to the shift register before the cpu loads another byte. if this happens, the tx fifo will be empty again and typically the uart's interrupt line would transition to the active state. this could cause a system with an interrupt control unit to record a tx fifo empty condition, even though the cpu is currently servicing that interrupt. therefore, after the first byte has been loaded into the fifo the uart will wait one serial character transmission time before issuing a new tx fifo empty interrupt. this one character tx interrupt delay will remain active until at least two bytes have been loaded into the fifo, concurrently. when the tx fifo empties after this condition, the tx interrupt will be activated without a one character delay. rx support functions and operation are quite different from those described for the transmitter. the rx fifo receives data until the number of bytes in the fifo equals the selected interrupt trigger level. at that time if rx interrupts are enabled, the uart will issue an interrupt to the cpu. the rx fifo will continue to store bytes until it holds 16 of them. it will not accept any more data when it is full. any more data entering the rx shift register will set the overrun error flag. normally, the fifo depth and the programmable trigger levels will give the cpu ample time to empty the rx fifo before an overrun occurs. one side-effect of having a rx fifo is that the selected interrupt trigger level may be above the data level in the fifo. this could occur when data at the end of the block contains fewer bytes than the trigger level. no interrupt would be issued to the cpu and the data would remain in the uart. to prevent the software from having to check for this situation the chip incorporates a timeout interrupt. the timeout interrupt is activated when there is a least one byte in the rx fifo, and neither the cpu nor the rx shift register has accessed the rx fifo within 4 character times of the last byte. the timeout interrupt is cleared or reset when the cpu reads the rx fifo or another character enters it. these fifo related features allow optimization of cpu/uart transactions and are especially useful given the higer baud rate capability (256 kbaud).
92 parallel port the FDC37C665GT and fdc37c666gt incorporate one ibm xt/at compatible parallel port. the FDC37C665GT and fdc37c666gt support the optional ps/2 type bi-directional parallel port (spp), the enhanced parallel port (epp) and the extended capabilities port (ecp) parallel port modes. refer to the FDC37C665GT configuration registers and fdc37c666gt hardware configuration description for information on disabling, power down, changing the base address of the parallel port, and selecting the mode of operation. the FDC37C665GT and fdc37c666gt also incorporate smsc's chiprotect circuitry, which prevents possible damage to the parallel port due to printer power-up. the functionality of the parallel port is achieved through the use of eight addressable ports, with their associated registers and control gating. the control and data port are read/write by the cpu, the status port is read/write in the epp mode. the address map of the parallel port is shown below: data port base address + 00h status port base address + 01h control port base address + 02h epp addr port base address + 03h epp data port 0 base address + 04h epp data port 1 base address + 05h epp data port 2 base address + 06h epp data port 3 base address + 07h the bit map of these registers is: d0 d1 d2 d3 d4 d5 d6 d7 note data port pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 1 status port tmout 0 0 nerr slct pe nack nbusy 1 control port strobe autofd ninit slc irqe pcd 0 0 1 epp addr port pd0 pd1 pd2 pd3 pd4 pd5 pd6 ad7 2,3 epp data port 0 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 2,3 epp data port 1 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 2,3 epp data port 2 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 2,3 epp data port 3 pd0 pd1 pd2 pd3 pd4 pd5 pd6 pd7 2,3 note 1: these registers are available in all modes. note 2: these registers are only available in epp mode. note 3 : for epp mode, iochrdy must be connected to the isa bus.
93 table 39 - parallel port connector host connector pin number standard epp ecp 1 77 nstrobe nwrite nstrobe 2-9 71-68, 66-63 pdata<0:7> pdata<0:7> pdata<0:7> 10 62 nack intr nack 11 61 busy nwait busy, periphack(3) 12 60 pe (nu) perror, nackreverse(3) 13 59 select (nu) select 14 76 nautofd ndatastb nautofd, hostack(3) 15 75 nerror (nu) nfault(1) nperiphrequest(3) 16 74 ninit (nu) ninit(1) nreverserqst(3) 17 73 nselectin naddrstrb nselectin(1,3) (1) = compatible mode (3) = high speed mode note: for the cable interconnection required for ecp support and the slave connector pin numbers, refer to the ieee 1284 extended capabilities port protocol and isa standard , rev. 1.09, jan. 7, 1993. this document is available from microsoft.
94 ibm xt/at compatible, bi-directional and epp modes data port address offset = 00h the data port is located at an offset of '00h' from the base address. the data register is cleared at initialization by reset. during a write operation, the data register latches the contents of the data bus with the rising edge of the niow input. the contents of this register are buffered (non inverting) and output onto the pd0 - pd7 ports. during a read operation in spp mode, pd0 - pd7 ports are buffered (not latched) and output to the host cpu. status port address offset = 01h the status port is located at an offset of '01h' from the base address. the contents of this register are latched for the duration of an nior read cycle. the bits of the status port are defined as follows: bit 0 tmout - time out this bit is valid in epp mode only and indicates that a 10 usec time out has occured on the epp bus. a logic 0 means that no time out error has occured; a logic 1 means that a time out error has been detected. this bit is cleared by a reset. writing a one to this bit clears the time out status bit. on a write, this bit is self clearing and does not require a write of a zero. writing a zero to this bit has no effect. bits 1, 2 - are not implemented as register bits, during a read of the printer status register these bits are a low level. bit 3 nerr - nerror the level on the nerror input is read by the cpu as bit 3 of the printer status register. a logic o means an error has been detected; a logic 1 means no error has been detected. bit 4 slct - printer selected status the level on the slct input is read by the cpu as bit 4 of the printer status register. a logic 1 means the printer is on line; a logic 0 means it is not selected. bit 5 pe - paper end the level on the pe input is read by the cpu as bit 5 of the printer status register. a logic 1 indicates a paper end; a logic 0 indicates the presence of paper. bit 6 nack - nacknowledge the level on the nack input is read by the cpu as bit 6 of the printer status register. a logic 0 means that the printer has received a character and can now accept another. a logic 1 means that it is still processing the last character or has not received the data. bit 7 nbusy - nbusy the complement of the level on the busy input is read by the cpu as bit 7 of the printer status register. a logic 0 in this bit means that the printer is busy and cannot accept a new character. a logic 1 means that it is ready to accept the next character. control port address offset = 02h the control port is located at an offset of '02h' from the base address. the control register is initialized by the reset input, bits 0 to 5 only being affected; bits 6 and 7 are hard wired low.
95 bit 0 strobe - strobe this bit is inverted and output onto the nstrobe output. bit 1 autofd - autofeed this bit is inverted and output onto the nautofd output. a logic 1 causes the printer to generate a line feed after each line is printed. a logic 0 means no autofeed. bit 2 ninit - ninitiate output this bit is output onto the ninit output without inversion. bit 3 slctin - printer select input this bit is inverted and output onto the nslctin output. a logic 1 selects the printer; a logic 0 means the printer is not selected. bit 4 irqe - interrupt request enable the interrupt request enable bit when set to a high level may be used to enable interrupt requests from the parallel port to the cpu. an interrupt request is generated on the irq port by a positive going nack input. when the irqe bit is programmed low the irq is disabled. bit 5 pcd - parallel control direction parallel control direction is valid in extended mode only (cr#1<3>=0). in printer mode, the direction is always out regardless of the state of this bit. in bi-directional mode, a logic 0 means that the printer port is in output mode (write); a logic 1 means that the printer port is in input mode (read). bits 6 and 7 during a read are a low level, and cannot be written. epp address port address offset = 03h the epp address port is located at an offset of '03h' from the base address. the address register is cleared at initialization by reset. during a write operation, the contents of db0- db7 are buffered (non inverting) and output onto the pd0 - pd7 ports, the leading edge of niow causes an epp address write cycle to be performed, the trailing edge of iow latches the data for the duration of the epp write cycle. during a read operation, pd0 - pd7 ports are read, the leading edge of ior causes an epp address read cycle to be performed and the data output to the host cpu, the deassertion of addrstb latches the pdata for the duration of the ior cycle. this register is only available in epp mode. epp data port 0 address offset = 04h the epp data port 0 is located at an offset of '04h' from the base address. the data register is cleared at initialization by reset. during a write operation, the contents of db0-db7 are buffered (non inverting) and output onto the pd0 - pd7 ports, the leading edge of niow causes an epp data write cycle to be performed, the trailing edge of iow latches the data for the duration of the epp write cycle. during a read operation, pd0 - pd7 ports are read, the leading edge of ior causes an epp read cycle to be performed and the data output to the host cpu, the deassertion of datastb latches the pdata for the duration of the ior cycle. this register is only available in epp mode. epp data port 1 address offset = 05h the epp data port 1 is located at an offset of '05h' from the base address. refer to epp data port 0 for a description of operation. this register is only available in epp mode. epp data port 2 address offset = 06h the epp data port 2 is located at an offset of '06h' from the base address. refer to epp data port 0 for a description of operation. this register is only available in epp mode.
96 epp data port 3 address offset = 07h the epp data port 3 is located at an offset of '07h' from the base address. refer to epp data port 0 for a description of operation. this register is only available in epp mode. epp 1.9 operation when the epp mode is selected in the configuration register, the standard and bi- directional modes are also available. if no epp read, write or address cycle is currently executing, then the pdx bus is in the standard or bi-directional mode, and all output signals (strobe, autofd, init) are as set by the spp control port and direction is controlled by pcd of the control port. in epp mode, the system timing is closely coupled to the epp timing. for this reason, a watchdog timer is required to prevent system lockup. the timer indicates if more than 10usec have elapsed from the start of the epp cycle (nior or niow asserted) to nwait being deasserted (after command). if a time-out occurs, the current epp cycle is aborted and the time-out condition is indicated in status bit 0. during an epp cycle, if strobe is active, it overrides the epp write signal forcing the pdx bus to always be in a write mode and the nwrite signal to always be asserted. software constraints before an epp cycle is executed, the software must ensure that the control register bit pcd is a logic "0" (ie a 04h or 05h should be written to the control port). if the user leaves pcd as a logic "1", and attempts to perform an epp write, the chip is unable to perform the write (because pcd is a logic "1") and will appear to perform an epp read on the parallel bus, no error is indicated. epp 1.9 write the timing for a write operation (address or data) is shown in timing diagram epp write data or address cycle. iochrdy is driven active low at the start of each epp write and is released when it has been determined that the write cycle can complete. the write cycle can complete under the following circumstances: 1. if the epp bus is not ready (nwait is active low) when ndatastb or naddrstb goes active then the write can complete when nwait goes inactive high. 2. if the epp bus is ready (nwait is inactive high) then the chip must wait for it to go active low before changing the state of ndatastb, nwrite or naddrstb. the write can complete once nwait is determined inactive. write sequence of operation 1. the host selects an epp register, places data on the sdata bus and drives niow active. 2. the chip drives iochrdy inactive (low). 3. if wait is not asserted, the chip must wait until wait is asserted. 4. the chip places address or data on pdata bus, clears pdir, and asserts nwrite. 5. chip asserts ndatastb or naddrstrb indicating that pdata bus contains valid information, and the write signal is valid. 6. peripheral deasserts nwait, indicating that any setup requirements have been satisfied and the chip may begin the termination phase of the cycle. 7. a) the chip d easserts ndatastb or naddrstrb, this marks the beginning of the termination phase. if it has not already done so, the peripheral should latch the information byte now. b) the chip latches the data from the sdata bus for the pdata bus and asserts (releases) iochrdy allowing the host to complete the write cycle.
97 8. peripheral asserts nwait, indicating to the host that any hold time requirements have been satisfied and acknowledging the termination of the cycle. 9. chip may modify nwrite and npdata in preparation for the next cycle. epp 1.9 read the timing for a read operation (data) is shown in timing diagram epp read data cycle. iochrdy is driven active low at the start of each epp read and is released when it has been determined that the read cycle can complete. the read cycle can complete under the following circumstances: 1.if the epp bus is not ready (nwait is active low) when ndatastb goes active then the read can complete when nwait goes inactive high. 2.if the epp bus is ready (nwait is inactive high) then the chip must wait for it to go active low before changing the state of write or before ndatastb goes active. the read can complete once nwait is determined inactive. read sequence of operation 1. the host selects an epp register and drives nior active. 2. the chip drives iochrdy inactive (low). 3. if wait is not asserted, the chip must wait until wait is asserted. 4. the chip tri-states the pdata bus and deasserts nwrite. 5. chip asserts ndatastb or naddrstrb indicating that pdata bus is tri-stated, pdir is set and the nwrite signal is valid. 6. peripheral drives pdata bus valid. 7. peripheral deasserts nwait, indicating that pdata is valid and the chip may begin the termination phase of the cycle. 8. a) the chip latches the data from the pdata bus for the sdata bus, deasserts ndatastb or naddrstrb, this marks the beginning of the termination phase. b) the chip drives the valid data onto the sdata bus and asserts (releases) iochrdy allowing the host to complete the read cycle. 9. per ipheral tri-states the pdata bus and asserts nwait, indicating to the host that the pdata bus is tri-stated. 10. chip may modify nwrite, pdir and npdata in preparation for the next cycle. epp 1.7 operation when the epp 1.7 mode is selected in the configuration register, the standard and bi- directional modes are also available. if no epp read, write or address cycle is currently executing, then the pdx bus is in the standard or bi-directional mode, and all output signals (strobe, autofd, init) are as set by the spp control port and direction is controlled by pcd of the control port. in epp mode, the system timing is closely coupled to the epp timing. for this reason, a watchdog timer is required to prevent system lockup. the timer indicates if more than 10usec have elapsed from the start of the epp cycle (nior or niow asserted) to the end of the cycle nior or niow deasserted). if a time-out occurs, the current epp cycle is aborted and the time-out condition is indicated in status bit 0. software constraints before an epp cycle is executed, the software must ensure that the control register bits d0, d1 and d3 are set to zero. also, bit d5 (pcd) is a logic "0" for an epp write or a logic "1" for and epp read.
98 epp 1.7 write the timing for a write operation (address or data) is shown in timing diagram epp 1.7 write data or address cycle. iochrdy is driven active low when nwait is active low during the epp cycle. this can be used to extend the cycle time. the write cycle can complete when nwait is inactive high. write sequence of operation 1. the host sets pdir bit in the control register to a logic "0". this asserts nwrite. 2. the host selects an epp register, places data on the sdata bus and drives niow active. 3. the chip places address or data on pdata bus. 4. chip asserts ndatastb or naddrstrb indicating that pdata bus contains valid information, and the write signal is valid. 5. if nwait is asserted, iochrdy is deasserted until the peripheral deasserts nwait or a time-out occurs. 6. when the host deasserts ni0w the chip deasserts ndatastb or naddrstrb and latches the data from the sdata bus for the pdata bus. 7. chip may modify nwrite, pdir and npdata in preparation of the next cycle. epp 1.7 read the timing for a read operation (data) is shown in timing diagram epp 1.7 read data cycle. iochrdy is driven active low when nwait is active low during the epp cycle. this can be used to extend the cycle time. the read cycle can complete when nwait is inactive high. read sequence of operation 1 . the host sets pdir bit in the control register to a logic "1". this deasserts nwrite and tri-states the pdata bus. 2 . the host selects an epp register and drives nior active. 3 . chip asserts ndatastb or naddrstrb indicating that pdata bus is tri-stated, pdir is set and the nwrite signal is valid. 4 . if nwait is asserted, iochrdy is deasserted until the peripheral deasserts nwait or a time-out occurs. 5 . the peripheral drives pdata bus valid. 6 . the peripheral deasserts nwait, indicating that pdata is valid and the chip may begin the termination phase of the cycle. 7 . when the host deasserts ni0r the chip deasserts ndatastb or naddrstrb. 8 . peripheral tri-states the pdat a bus. 9 . chip may modify nwrite, pdir and npdata in preparation of the next cycle.
99 table 40 - epp pin descriptions epp signal epp name type epp description nwrite nwrite o this signal is active low. it denotes a write operation. pd<0:7> address/data i/o bi-directional epp byte wide address and data bus. intr interrupt i this signal is active high and positive edge triggered. (pass through with no inversion, same as spp.) nwait nwait i this signal is active low. it is driven inactive as a positive acknowledgement from the device that the transfer of data is completed. it is driven active as an indication that the device is ready for the next transfer. ndatastb ndata strobe o this signal is active low. it is used to denote data read or write operation. nreset nreset o this signal is active low. when driven active, the epp device is reset to its initial operational mode. naddrstb naddress strobe o this signal is active low. it is used to denote address read or write operation. pe paper end i same as spp mode. slct printer selected status i same as spp mode. nerr nerror i same as spp mode. pdir parallel port direction o this output shows the direction of the data transfer on the parallel port bus. a low means an output/write condition and a high means an input/read condition. this signal is normally a low (output/write) unless pcd of the control register is set or if an epp read cycle is in progress. note 1: spp and epp can use 1 common register. note 2: nwrite is the only epp output that can be over-ridden by spp control port during an epp cycle. for correct epp read cycles, pcd is required to be a low.
100 extended capabilities parallel port ecp provides a number of advantages, some of which are listed below. the individual features are explained in greater detail in the remainder of this section. ? high performance half -duplex forward and reverse channel ? interlocked handshake, for fast reliable transfer ? optional single byte rle compression for improved throughput (64:1) ? channel addressing for low -cost peripherals ? maintains link and data layer separation ? permits the use of active output drivers ? permits the use of adaptive signal timing ? peer -to -peer capability vocabulary the following terms are used in this document: assert: when a signal asserts it transitions to a "true" state, when a signal deasserts it transitions to a "false" state. forward: host to peripheral communication. reverse: peripheral to host communication. pword: a po rt word; equal in size to the width of the isa interface. for this implementation, pword is always 8 bits. 1: a high level. 0: a low level. these terms may be considered synonymous: periphclk, nack hostack, nautofd periphack, busy nperiphrequest, nfault nreverserequest, ninit nackreverse, perror xflag, select ecpmode, nselectln hostclk, nstrobe reference document the ieee 1284 extended capabilities port protocol and isa interface standard , rev 1.09, jan 7, 1993. this document is available from microsoft. the bit map of the extended parallel port registers is: d7 d6 d5 d4 d3 d2 d1 d0 note data pd7 pd6 pd5 pd4 pd3 pd2 pd1 pd0 ecpafifo addr/rle address or rle field 2 dsr nbusy nack perror select nfault 0 0 0 1 dcr 0 0 direction ackinten selectin ninit autofd strobe 1 cfifo parallel port data fifo 2 ecpdfifo ecp data fifo 2 tfifo test fifo 2 cnfga 0 0 0 1 0 0 0 0 cnfgb compress intrvalue 0 0 0 0 0 0 ecr mode nerrintren dmaen serviceintr full empty note 1: these registers are available in all modes. note 2: all fifos use one common 16 byte fifo.
101 isa implementation standard this specification describes the standard isa interface to the extended capabilities port (ecp). all isa devices supporting ecp must meet the requirements contained in this section or the port will not be supported by microsoft. for a description of the ecp protocol, please refer to the ieee 1284 extended capabilities port protocol and isa interface standard , rev. 1.09, jan.7, 1993. this document is available from microsoft. description the port is software and hardware compatible with existing parallel ports so that it may be used as a standard lpt port if ecp is not required. the port is designed to be simple and requires a small number of gates to implement. it does not do any "protocol" negotiation, rather it provides an automatic high burst -bandwidth channel that supports dma for ecp in both the forward and reverse directions. small fifos are employed in both forward and reverse directions to smooth data flow and improve the maximum bandwidth requirement. the size of the fifo is 16 bytes deep. the port supports an automatic handshake for the standard parallel port to improve compatibility mode transfer speed. the port also supports run length encoded (rle) decompression (required) in hardware. compression is accomplished by counting identical bytes and transmitting an rle byte that indicates how many times the next byte is to be repeated. decompression simply intercepts the rle byte and repeats the following byte the specified number of times. hardware support for compression is optional.
102 table 41 - ecp pin descriptions name type description nstrobe o during write operations nstrobe registers data or address into the slave on the asserting edge (handshakes with busy). pdata 7:0 i/o contains address or data or rle data. nack i indicates valid data driven by the peripheral when asserted. this signal handshakes with nautofd in reverse. periphack (busy) i this signal deasserts to indicate that the peripheral can accept data. this signal handshakes with nstrobe in the forward direction. in the reverse direction this signal indicates whether the data lines contain ecp command information or data. the peripheral uses this signal to flow control in the forward direction. it is an "interlocked" handshake with nstrobe. periphack also provides command information in the reverse direction. perror (nackreverse) i used to acknowledge a change in the direction the transfer (asserted = forward). the peripheral drives this signal low to acknowledge nreverserequest. it is an "interlocked" handshake with nreverserequest. the host relies upon nackreverse to determine when it is permitted to drive the data bus. select i indicates printer on line. nautofd (hostack) o requests a byte of data from the peripheral when asserted, handshaking with nack in the reverse direction. in the forward direction this signal indicates whether the data lines contain ecp address or data. the host drives this signal to flow control in the reverse direction. it is an "interlocked" handshake with ack . hostack also provides command information in the forward phase. nfault (nperiphrequest) i generates an error interrupt when asserted. this signal provides a mechanism for peer -to -peer communication. this signal is valid only in the forward direction. during ecp mode the peripheral is permitted (but not required) to drive this pin low to request a reverse transfer. the request is merely a "hint" to the host; the host has ultimate control over the transfer direction. this signal would be typically used to generate an interrupt to the host cpu. ninit o sets the transfer direction (asserted = reverse, deasserted = forward). this pin is driven low to place the channel in the reverse direction. the peripheral is only allowed to drive the bi -directional data bus while in ecp mode and hostack is low and nselectin is high. nselectin o always deasserted in ecp mode.
103 register definitions the register definitions are based on the standard ibm addresses for lpt. all of the standard printer ports are supported. the additional registers attach to an upper bit decode of the standard lpt port definition to avoid conflict with standard isa devices. the port is equivalent to a generic parallel port interface and may be operated in that mode. the port registers vary depending on the mode field in the ecr. the table below lists these dependencies. operation of the devices in modes other that those specified is undefined. table 42 - ecp register definitions name address (note 1) ecp modes function data +000h r/w 000-001 data register ecpafifo +000h r/w 011 ecp fifo (address) dsr +001h r/w all status register dcr +002h r/w all control register cfifo +400h r/w 010 parallel port data fifo ecpdfifo +400h r/w 011 ecp fifo (data) tfifo +400h r/w 110 test fifo cnfga +400h r 111 configuration register a cnfgb +401h r/w 111 configuration register b ecr +402h r/w all extended control register note 1: these addresses are added to the parallel port base address as selected by configuration register or jumpers. note 2: all addresses are qualified with aen. refer to the aen pin definition. table 43 - mode descriptions mode description* 000 spp mode 001 ps/2 parallel port mde 010 parallel port data fifo mode 011 ecp parallel port mode 100 epp mode (if this option is enabled in the configuration registers) 101 (reserved) 110 test mode 111 configuration mode *refer to ecr register description
104 data and ecpafifo port address offset = 00h modes 000 and 001 (data port) the data port is located at an offset of '00h' from the base address. the data register is cleared at initialization by reset. during a write operation, the data register latches the contents of the data bus on the rising edge of the niow input. the contents of this register are buffered (non inverting) and output onto the pd0 - pd7 ports. during a read operation, pd0 - pd7 ports are read and output to the host cpu. mode 011 (ecp fifo - address/rle) a data byte written to this address is placed in the fifo and tagged as an ecp address/rle. the hardware at the ecp port transmitts this byte to the peripheral automatically. the operation of this register is ony defined for the forward direction (direction is 0). refer to the ecp parallel port forward timing diagram, located in the timing diagrams section of this data sheet . device status register (dsr) address offset = 01h the status port is located at an offset of '01h' from the base address. bits 0 - 2 are not implemented as register bits, during a read of the printer status register these bits are a low level. the bits of the status port are defined as follows: bit 3 nfault the level on the nfault input is read by the cpu as bit 3 of the device status register. bit 4 select the level on the select input is read by the cpu as bit 4 of the device status register. bit 5 perror the level on the perror input is read by the cpu as bit 5 of the device status register. printer status register. bit 6 nack the level on the nack input is read by the cpu as bit 6 of the device status register. bit 7 nbusy the complement of the level on the busy input is read by the cpu as bit 7 of the device status register. device control register (dcr) address offset = 02h the control register is located at an offset of '02h' from the base address. the control register is initialized to zero by the reset input, bits 0 to 5 only being affected; bits 6 and 7 are hard wired low. bit 0 strobe - strobe this bit is inverted and output onto the nstrobe output. bit 1 autofd - autofeed this bit is inverted and output onto the nautofd output. a logic 1 causes the printer to generate a line feed after each line is printed. a logic 0 means no autofeed. bit 2 ninit - ninitiate output this bit is output onto the ninit output without inversion. bit 3 selectin this bit is inverted and output onto the nslctin output. a logic 1 on this bit selects the printer; a logic 0 means the printer is not selected. bit 4 ackinten - interrupt request enable the interrupt request enable bit when set to a high level may be used to enable interrupt requests from the parallel port to the cpu due
105 to a low to high transition on the nack input. refer to the description of the interrupt under operation, interrupts. bit 5 direction if mode=000 or mode=010, this bit has no effect and the direction is always out regardless of the state of this bit. in all other modes, direction is valid and a logic 0 means that the printer port is in output mode (write); a logic 1 means that the printer port is in input mode (read). bits 6 and 7 during a read are a low level, and cannot be written. cfifo (parallel port data fifo) address offset = 400h mode = 010 bytes written or dmaed from the system to this fifo are transmitted by a hardware handshake to the peripheral using the standard parallel port protocol. transfers to the fifo are byte aligned. this mode is only defined for the forward direction. ecpdfifo (ecp data fifo) address offset = 400h mode = 011 bytes written or dmaed from the system to this fifo, when the direction bit is 0, are transmitted by a hardware handshake to the peripheral using the ecp parallel port protocol. transfers to the fifo are byte aligned. data bytes from the peripheral are read under automatic hardware handshake from ecp into this fifo when the direction bit is 1. reads or dmas from the fifo will return bytes of ecp data to the system. tfifo (test fifo mode) address offset = 400h mode = 110 data bytes may be read, written or dmaed to or from the system to this fifo in any direction. data in the tfifo will not be transmitted to the to the parallel port lines using a hardware protocol handshake. however, data in the tfifo may be displayed on the parallel port data lines. the tfifo will not stall when overwritten or underrun. if an attempt is made to write data to a full tfifo, the new data is not accepted into the tfifo. if an attempt is made to read data from an empty tfifo, the last data byte is re- read again. the full and empty bits must always keep track of the correct fifo state. the tfifo will transfer data at the maximum isa rate so that software may generate performance metrics. the fifo size and interrupt threshold can be determined by writing bytes to the fifo and checking the full and serviceintr bits. the writeintrthreshold can be derermined by starting with a full tfifo, setting the direction bit to 0 and emptying it a byte at a time until serviceintr is set. this may generate a spurious interrupt, but will indicate that the threshold has been reached. the readintrthreshold can be derermined by setting the direction bit to 1 and filling the empty tfifo a byte at a time until serviceintr is set. this may generate a spurious interrupt, but will indicate that the threshold has been reached.
106 data bytes are always read from the head of tfifo regardless of the value of the direction bit. for example if 44h, 33h, 22h is written to the fifo, then reading the tfifo will return 44h, 33h, 22h in the same order as was written. cnfga (configuration register a) address offset = 400h mode = 111 this register is a read only register. when read, 10h is returned. this indicates to the system that this is an 8-bit implementation. (pword = 1 byte) cnfgb (configuration register b) address offset = 401h mode = 111 bit 7 compress this bit is read only. during a read it is a low level. this means that this chip does not support hardware rle compression. it does support hardware de-compression! bit 6 intrvalue returns the value on the isa irq line to determine possible conflicts. bits 5:0 reserved during a read are a low level. these bits cannot be written. ecr (extended control register) address offset = 402h mode = all this register controls the extended ecp parallel port functions. bits 7,6,5 these bits are read/write and select the mode. bit 4 nerrintren read/write (valid only in ecp mode) 1: disables the interrupt generated on the asserting edge of nfault. 0: enables an interrupt pulse on the high to low edge of nfault. note that an interrupt will be generated if nfault is asserted (interrupting) and this bit is written from a 1 to a 0. this prevents interrupts from being lost in the time between the read of the ecr and the write of the ecr. bit 3 dmaen read/write 1: enables dma (dma starts when serviceintr is 0). 0: disables dma unconditionally. bit 2 serviceintr read/write 1: disables dma and all of the service interrupts. 0: enables one of the following 3 cases of interrupts. once one of the 3 service interrupts has occurred serviceintr bit shall be set to a 1 by hardware, it must be reset to 0 to re-enable the interrupts. writing this bit to a 1 will not cause an interrupt. case dmaen=1: during dma (this bit is set to a 1 when terminal count is reached). case dmaen=0 direction=0: this bit shall be set to 1 whenever there are writeintrthreshold or more bytes free in the fifo. case dmaen=0 direction=1: this bit shall be set to 1 whenever there are readintrthreshold or more valid bytes to be read from the fifo. bit 1 full read only 1: the fifo cannot accept another byte or the fifo is completely full. 0: the fifo has at least 1 free byte. bit 0 empty read only 1: the fifo is completely empty. 0: the fifo contains at least 1 byte of data.
107 table 44 - extend ed control register r/w mode 000: standard parallel port mode . in this mode the fifo is reset and common collector drivers are used on the control lines (nstrobe, nautofd, ninit and nselectin). setting the direction bit will not tri -state the output drivers in this mode. 001: ps/2 parallel port mode. same as above except that direction may be used to tri -state the data lines and reading the data register returns the value on the data lines and not the value in the data register. all drivers have active pull -ups (push -pull). 010: parallel port fifo mode. this is the same as 000 except that bytes are written or dmaed to the fifo. fifo data is automatically transmitted using the standard parallel port protocol. note that this mode is only useful when direction is 0. all drivers have active pull -ups (push -pull). 011: ecp parallel port mode. in the forward direction (direction is 0) bytes placed into the ecpdfifo and bytes written to the ecpafifo are placed in a single fifoand transmitted automatically to the peripheral using ecp protocol. in the reverse direction (direction is1) bytes are moved from the ecp parallel port and packed into bytes in the ecpdfifo. all drivers have active pull -ups (push -pull). 100: selects epp mode: in this mode, epp is selected if the epp supported option is selected in configuration register cr4. all drivers have active pull -ups (push -pull). 101: reserved 110: test mode. in this mode the fifo may be written and read, but the data will not be transmitted on the parallel port. all drivers have active pull -ups (push -pull). 111: configuration mode. in this mode the confga, confgb registers are accessible at 0x400 and 0x401. all drivers have active pull -ups (push -pull).
108 operation mode switching/software control software will execute p1284 negotiation and all operation prior to a data transfer phase under programmed i/o control (mode 000 or 001). hardware provides an automatic control line handshake, moving data between the fifo and the ecp port only in the data transfer phase (modes 011 or 010). setting the mode to 011 or 010 will cause the hardware to initiate data transfer. if the port is in mode 000 or 001 it may switch to any other mode. if the port is not in mode 000 or 001 it can only be switched into mode 000 or 001. the direction can only be changed in mode 001. once in an extended forward mode the software should wait for the fifo to be empty before switching back to mode 000 or 001. in this case all control signals will be deasserted before the mode switch. in an ecp reverse mode the software waits for all the data to be read from the fifo before changing back to mode 000 or 001. since the automatic hardware ecp reverse handshake only cares about the state of the fifo it may have acquired extra data which will be discarded. it may in fact be in the middle of a transfer when the mode is changed back to 000 or 001. in this case the port will deassert nautofd independent of the state of the transfer. the design shall not cause glitches on the handshake signals if the software meets the constraints above. ecp operation prior to ecp operation the host must negotiate on the parallel port to determine if the peripheral supports the ecp protocol. this is a somewhat complex negotiation carried out under program control in mode 000. after negotiation, it is necessary to initialize some of the port bits. the following are required: ? set direction = 0, enabling the drivers. ? set strobe = 0, causing the nstrobe signal to default to the deasserted state. ? set autofd = 0, causing the nautofd signal to default to the deasserted state. ? set mode = 011 (ecp mode) ecp address/rle bytes or data bytes may be sent automatically by writing the ecpafifo or ecpdfifo respectively. note that all fifo data transfers are byte wide and byte aligned. address/rle transfers are byte -wide and only allowed in the forward direction. the host may switch directions by first switching to mode = 001, negotiating for the forward or reverse channel, setting direction to 1 or 0, then setting mode = 011. when direction is 1 the hardware shall handshake for each ecp read data byte and attempt to fill the fifo. bytes may then be read from the ecpdfifo as long as it is not empty . ecp transfers may also be accomplished (albeit slowly) by handshaking individual bytes under program control in mode = 001, or 000. termination from ecp mode termination from ecp mode is similar to the termination from nibble/byte modes. the host is permitted to terminate from ecp mode only in specific well -defined states. the termination can only be executed while the bus is in the forward direction. to terminate while the channel is in the reverse direction, it must first be transitioned into the forward direction.
109 command/data ecp mode supports two advanced features to improve the effectiveness of the protocol for some applications. the features are implemented by allowing the transfer of normal 8 -bit data or 8 -bit commands. when in the forward direction, normal data is transferred when hostack is high and an 8 -bit command is transferred when hostack is low. the most significant bit of the command indicates whether it is a run -length count (for compression) or a channel address. when in the reverse direction, normal data is transferred when periphack is high and an 8 -bit command is transferred when periphack is low. the most significant bit of the command is always zero. reverse channel addresses are seldom used and may not be supported in hardware. table 45 forwar d channel commands (hostack low) reverse channel commands (peripack low) d7 d[6:0] 0 run -length count (0 -127) (mode 0011 0x00 only) 1 channel address (0 -127) data compression the FDC37C665GT/666gt supports run length encoded (rle) decompression in hardware and can transfer compressed data to a peripheral. run length encoded (rle) compression in hardware is not supported. to transfer compressed data in ecp mode, the compression count is written to the ecpafifo and the data byte is written to the ecpdfifo. compression is accomplished by counting identical bytes and transmitting an rle byte that indicates how many times the next byte is to be repeated. decompression simply intercepts the rle byte and repeats the following byte the specified number of times. when a run -length count is received from a peripheral, the subsequent data byte is replicated the specified number of times. a run -length count of zero specifies that only one byte of data is represented by the next data byte, whereas a run -length count of 127 indicates that the next byte should be expanded to 128 bytes. to prevent data expansion, however, run -length counts of zero should be avoided. pin definition the drivers for nstrobe, nautofd, ninit and nselectin are open-collector in mode 000 and are push-pull in all other modes. isa connections the interface can never stall causing the host to hang. the width of data transfers is strictly controlled on an i/o address basis per this specification. all fifo -dma tra nsfers are byte wide, byte aligned and end on a byte boundary. (the pword value can be obtained by reading configuration register a, cnfga, described in the next section.) single byte wide transfers
110 are always possible with standard or ps/2 mode using program control of the control signals. interrupts the interrupts are enabled by serviceintr in the ecr register. serviceintr = 1 disables the dma and all of the service interrupts. serviceintr = 0enables the selected interrupt condition. if the interrupting condition is valid, then the interrupt is generated immediately when this bit is changed from a 1 to a 0. this can occur during programmed i/o if the number of bytes removed or added from/to the fifo does not cross the threshold. the interrupt generated is isa friendly in that it must pulse the interrupt line low, allowing for interrupt sharing. after a brief pulse low following the interrupt event, the interrupt line is tri -stated so that other interrupts may assert. an interrupt is generated when: 1 . for dma transfers: when serviceintr is 0, dmaen is 1 and the dma tc is received. 2 . for programmed i/o: a . when serviceintr is 0, dmaen is 0, direction is 0 and there are writeintrthreshold or more free bytes in the fifo. also, an interrupt is generated when serviceintr is cleared to 0 whenever there are writeintrthreshold or more free bytes in the fifo. b . ( 1 ) when serviceintr is 0, dmaen is 0, direction is 1 and there are readintrthreshold or more bytes in the fifo. also, an interrupt is generated when serviceintr is cleared to 0 whenever there are readintrthreshold or more bytes in the fifo. 3 . when nerrintren is 0 and nfault transitions from high to low or when nerrintren is set from 1 to 0 and nfault is asserted. 4 . when ackinten is 1 and the nack signal transitions from a low to a high. fifo operation the fifo threshold is set in the chip configuration registers. all data transfers to or from the parallel port can proceed in dma or programmed i/o (non-dma) mode as indicated by the selected mode. the fifo is used by selecting the parallel port fifo mode or ecp parallel port mode. (fifo test mode will be addressed separately.) after a reset, the fifo is disabled. each data byte is transferred by a programmed i/o cycle or pdrq depending on the selection of dma or programmed i/o mode. the following paragraphs detail the operation of the fifo flow control. in these descriptions, ranges from 1 to 16. the parameter fifothr, which the user programs, is one less and ranges from 0 to 15. a low threshold value (i.e. 2) results in longer periods of time between service requests, but requires faster servicing of the request for both read and write cases. the host must be very responsive to the service request. this is the desired case for use with a "fast" system.
111 a high value of threshold (i.e. 12) is used with a "sluggish" system by affording a long latency period after a service request, but results in more frequent service requests. dma transfers dma transfers are always to or from the ecpdfifo, tfifo or cfifo. dma utilizes the standard pc dma services. to use the dma transfers, the host first sets up the direction and state as in the programmed i/o case. then it programs the dma controller in the host with the desired count and memory address. lastly it sets dmaen to 1 and serviceintr to 0. the ecp requests dma transfers from the host by activating the pdrq pin. the dma will empty or fill the fifo using the appropriate direction and mode. when the terminal count in the dma controller is reached, an interrupt is generated and serviceintr is asserted, disabling dma. in order to prevent possible blocking of refresh requests dreq shall not be asserted for more than 32 dma cycles in a row. the fifo is enabled directly by asserting npdack and addresses need not be valid. pintr is generated when a tc is received. pdrq must not be asserted for more than 32 dma cycles in a row. after the 32nd cycle, pdrq must be kept unasserted until npdack is deasserted for a minimum of 350nsec. (note: the only way to properly terminate dma transfers is with a tc.) dma may be disabled in the middle of a transfer by first disabling the host dma controller. then setting serviceintr to 1, followed by setting dmaen to 0, and waiting for the fifo to become empty or full. restarting the dma is accomplished by enabling dma in the host, setting dmaen to 1, followed by setting serviceintr to 0. dma mode - transfers from the fifo to the host (note: in the reverse mode, the peripheral may not continue to fill the fifo if it runs out of data to transfer, even if the chip continues to request more data from the peripheral.) the ecp activates the pdrq pin whenever there is data in the fifo. the dma controller must respond to the request by reading data from the fifo. the ecp will deactivate the pdrq pin when the fifo becomes empty or when the tc becomes true (qualified by npdack), indicating that no more data is required. pdrq goes inactive after npdack goes active for the last byte of a data transfer (or on the active edge of nior, on the last byte, if no edge is present on npdack). if pdrq goes inactive due to the fifo going empty, then pdrq is active again as soon as there is one byte in the fifo. if pdrq goes inactive due to the tc, then pdrq is active again when there is one byte in the fifo, and serviceintr has been re-enabled. (note: a data underrun may occur if pdrq is not removed in time to prevent an unwanted cycle.) programmed i/o mode or non-dma mode the ecp or parallel port fifos may also be operated using interrupt driven programmed i/o. software can determine the writeintrthreshold, readintrthreshold, and fifo depth by accessing the fifo in test mode. programmed i/o transfers are to the ecpdfifo at 400h and ecpafifo at 000h or from the ecpdfifo located at 400h, or to/from the tfifo at 400h. to use the programmed i/o transfers, the host first sets up the direction and state, sets dmaen to 0 and serviceintr to 0. the ecp requests programmed i/o transfers from the host by activating the pintr pin. the programmed i/o will empty or fill the fifo using the appropriate direction and mode. note: a threshold of 16 is equivalent to a threshold of 15. these two cases are treated the same.
112 programmed i/o - transfers from the fifo to the host in the reverse direction an interrupt occurs when serviceintr is 0 and readintrthreshold bytes are available in the fifo. if at this time the fifo is full it can be emptied completely in a single burst, otherwise readintrthreshold bytes may be read from the fifo in a single burst. readintrthreshold =(16-) data bytes in fifo an interrupt is generated when serviceintr is 0 and the number of bytes in the fifo is greater than or equal to (16-). (if the threshold = 12, then the interrupt is set whenever there are 4-16 bytes in the fifo.) the pint pin can be used for interrupt-driven systems. the host must respond to the request by reading data from the fifo. this process is repeated until the last byte is transferred out of the fifo. if at this time the fifo is full, it can be completely emptied in a single burst, otherwise a minimum of (16-) bytes may be read from the fifo in a single burst. programmed i/o - transfers from the host to the fifo in the forward direction an interrupt occurs when serviceintr is 0 and there are writeintrthreshold or more bytes free in the fifo. at this time if the fifo is empty it can be filled with a single burst before the empty bit needs to be re -read. otherwise it may be filled with writeintrthreshold bytes. writeintrthreshold = (16-) free bytes in fif o an interrupt is generated when serviceintr is 0 and the number of bytes in the fifo is less than or equal to . (if the threshold = 12, then the interrupt is set whenever there are 12 or less bytes of data in the fifo.) the pint pin can be used for interrupt-driven systems. the host must respond to the request by writing data to the fifo. if at this time the fifo is empty, it can be completely filled in a single burst, otherwise a minimum of (16-) bytes may be written to the fifo in a single burst. this process is repeated until the last byte is transferred into the fifo.
113 integrated drive electronics interface the ide interface enables hard disks with embedded controllers (at and xt) to be interfaced to the host processor. the following definitions are for reference only. these registers are not implemented in the FDC37C665GT and fdc37c666gt. access to these registers are controlled by the FDC37C665GT and fdc37c666gt. for more information, refer to the ide pin descriptions and the ata specification. host file registers the host file registers are accessed by the at host, rather than the local processor. there are two groups of registers, the at task file, and the miscellaneous at registers. address 1f0h-1f7h; 170h-177h these at registers contain the task file registers. these registers communicate data, command, and status information with the at host, and are addressed when nhdcs0 is low. address 376h/3f6h; 377h/3f7h these at registers may be used by the bios for drive control. they are accessed by the at interface when nhdsc1 is active. figure 3 shows the at host register map of the FDC37C665GT and fdc37c666gt. figure 3 - host processor register address map (at mode) primary secondary 1f0h | 1f7h 1 7 0h | 1 7 7h task file registers 3 f 6 h | 3 f7h 376 h | 377 h misc. at registers task file registers task file registers may be accessed by the host at when pin nhdcs0 is active (low). the data register (1f0h) is 16 bits wide; the remaining task file registers are 8 bits wide. the task file registers are ata and eata compatible. please refer to the ata and eata specifications. these are available from: global engineering 2805 mcgaw street irvine, ca 92714 (800) 854-7179 (714) 261-1455
114 command d7 d6 d5 d4 d3 d2 d1 d0 restore (recalibrate) 0 0 0 1 r r r r seek 0 1 1 1 r r r r read sector 0 0 1 0 d 0 l t write sector 0 0 1 1 d 0 l t format track 0 1 0 1 d 0 0 0 read verify 0 1 0 0 d 0 0 t diagnose 1 0 0 1 0 0 0 0 set parameters 1 0 0 1 0 0 0 1 bit definitions: r: specifies the step rate to be used for the command. d: if set, 16 bit dma is to be used for the data transfer. (optional for high performance) l: if set, the ecc will be transferred following the data. t: if set, retries are inhibited for the command.
115 at host addressable registers (for reference only) task file registers addr r/w d15 d14 d13 d12 d11 d10 d9 d8 d7 d6 d5 d4 d3 d2 d1 d0 name 000h r/w data register (redirected to fifo) data reg addr r/w d7 d6 d5 d4 d3 d2 d1 d0 name 001h r bb crc - id - ac tk dm error flags 001h w cylinder number ? 4 write precomp cylinder 002h r/w number of sectors sector count 003h r/w sector number sector number 004h r/w cylinder number (lsb's) cylinder low 005h r/w cylinder number (msb's) cylinder high 006h r/w - - drive head head, drive 007h r bsy rdy wf sc drq cd index err status 007h w command command
116 miscellaneous at registers addr r/w d7 d6 d5 d4 d3 d2 d1 d0 name 3f6h/ 376h r bsy rdy wf sc drq cd index err status 3f6h/ 376h w reserved hs3en adptr reset disable irq re- served fixed disk 3f7h/ 377h r - nwg nhs3 nhs2 nhs1 nhs0 nds1 nds0 digital input 3f7h/ 377h w - - - - - - - - reserved
117 configuration the configuration of the FDC37C665GT within the user system is selected through software selectable configuration registers. the different configurations of the fdc37c666gt can be selected through a combination of jumper options and software. FDC37C665GT configuration registers the configuration registers are used to select programmable options of the fdc. after power up, the fdc is in the default mode. the default modes are identified in the configuration mode register description. to program the configuration registers, the following sequence must be followed: 1.enter configuration mode. 2.configure fdc registers. 3.exit configuration mode. enter configuration mode to enter the configuration mode of the FDC37C665GT, two writes in succession to port 3f0h with 55h data are required. if a write to another address or port occurs between these two writes, the chip does not enter the configuration mode. it is strongly recommended that interrupts be disabled for the duration of these two writes. configure FDC37C665GT the FDC37C665GT contains sixteen configuration registers, cr0-crf. these registers are accessed by first writing the number (0-f) of the desired register to port 3f0h and then writing or reading the configuration register through port 3f1h. exit configuration mode the configuration mode is exited by writing an aah to port 3f0h. programming example the following is an example of a configuration program in intel 8086 assembly language. for this example, the FDC37C665GT is being reset to the default condition after power up.
118 ;-----------------------------. ; enter configuration mode | ;-----------------------------' mov dx,3f0h mov ax,055h ;use 044h for fdc37c666gt cli ; disable interrupts out dx,al out dx,al sti ; enable interrupts ;-----------------------------. ; configure registers cr0-crx | ;-----------------------------' mov dx,3f0h mov al,00h out dx,al ; point to cr0 mov dx,3f1h mov al,3fh out dx,al ; update cr0 ; mov dx,3f0h ; mov al,01h out dx,al ; point to cr1 mov dx,3f1h mov al,9fh out dx,al ; update cr1 ; ; repeat for all crx registers ; ;----------------------------. ; exit configuration mode | ;----------------------------' mov dx,3f0h mov ax,0aah out dx,al
119 table 46 - FDC37C665GT configuration registers default db7 db6 db5 db4 db3 db2 db1 db0 3bh cr0 valid osc fdc en fdc pwr (reserved) ide at/xt ide en 9fh cr1 lock crx com3, 4 addr irq pol pp mode pp pwr parallel port address dch cr2 uart2 pwr uart2 en uart2 address uart1 pwr uart1 en uart1 address 78h cr3 adrx/ drv2 en/ pintr ident mfm drive options pintr enhanced fdc mode 2 (reserved) 00h cr4 (reserved) epp type midi 2 midi 1 parallel port fdc pp ext modes 00h cr5 (reserved) extx4 drv 0x1 den sel dma mode ide sec fdc sec ffh cr6 floppy drive d floppy drive c floppy drive b floppy drive a 00h cr7 reserved media id polarity floppy boot drive 00h cr8 adr7 adr6 adr5 adr4 adr3 adr2 adr1 adr0 00h cr9 reserved adr10 adr9 adr8 00h cra reserved ecp fifo threshold tbd crb reserved tbd crc reserved 66/65h crd 0 1 1 0 0 1 1/0 0/1 01h cre 0 0 0 0 0 0 1 0 00h crf test modes - reserved FDC37C665GT configuration register description the configuration registers consist of seventeen registers, the configuration select register and configuration registers 0-f. the configuration select register is written to by writing to port 3f0h. the configuration registers 0-f are accessed by reading or writing to port 3f1h. configuration select register (csr) this register can only be accessed when the fdc is in the configuration mode. this register, located at port 3f0h, must be initialized upon entering the configuration mode before the configuration registers (cr0-crf) can be accessed and is used to select which of the configuration registers are to be accessed at port 3f1h. configuration registers 0-f these registers are set to their default values at power up and are not affected by reset. they are accessed at port 3f1h. refer to the following descriptions for the function of each configuration register.
120 cr0 this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 00h. the default value of this register after power up is 3bh for the FDC37C665GT and 2bh for the fdc37c666gt. table 47 - cr0 bit no. bit name description 0 ide enable a high level on this bit, enables the ide (default). a low level on this bit disables the ide. 1 ide at/xt a high level on this bit sets the ide to at type (default). a low level on this bit sets the ide to xt type. 2 resr (this bit is reserved - set to '0'). 3 fdc power a high level on this bit, supplies power to the fdc (default). a low level on this bit puts the fdc in low power mode. 4 fdc enable a high level on this bit, enables the fdc (default for FDC37C665GT). a low level on this bit disables the fdc (default for FDC37C665GT). 5,6 osc 6 5 0 0 osc on, baud rate generator (brg) clock enabled. 0 1 osc is on, brg clock is on when pwrgd is active. when pwrgd is inactive, osc is off and brg clock is disabled (default). 1 0 (same as 0 1 case) 1 1 osc off, br generator clock disabled 7 valid a high level on this software controlled bit indicates that a valid configuration cycle has occurred. the control software must take care to set this bit at the appropriate times. set to zero after power up.
121 cr1 this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 01h. the default value of this register after power up is 9fh. table 48 - cr1 bit no. bit name description 0,1 parallel port address these bits are used to select the parallel port address. 1 0 parallel port address 0 0 disabled 0 1 3bch 1 0 378h 1 1 278h (default) 2 parallel port power a high level on this bit, supplies power to the parallel port (default). a low level on this bit puts the parallel port in low power mode. 3 parallel port mode parallel port mode. a high level on this bit, sets the parallel port for printer mode (default). a low level on this bit enables the extended parallel port modes. refer to bits 0 and 1 of cr4 4 irq polarity a high level on this bit, programs irq3, irq4, fintr and (pintr) for active high, inactive low (default). a low level on this bit programs irq3, irq4, fintr and (pintr) for active low, inactive hi-z. (see note cr1_1) 5,6 com3,4 select the com3 and com4 address. 6 5 com3 com4 0 0 338h 238h (default) 0 1 3e8h 2e8h 1 0 2e8h 2e0h 1 1 220h 228h 7 lock crx a high level on this bit enables the reading and writing of cr0- crf (default). a low level on this bit disables the reading and writing of cr0-crf. once set to 0, this bit can only be set to 1 by a hard reset or power-up reset. note cr1_1: if the parallel port is configured for ecp or epp modes, then pintr is always active low, inactive hi-z independent of this bit.
122 cr2 this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 02h. the default value of this register after power up is dch. table 49 - cr2 bit no. bit name description 0,1 uart 1 address select these bits select the primary serial port address. 1 0 com port address 0 0 com1 3f8h (default) 0 1 com2 2f8h 1 0 com3 (refer to cr1, bits 5,6) 1 1 com4 (refer to cr1, bits 5,6) 2 uart 1 enable a high level on this bit, enables the primary serial port (default). a low level on this bit disables the primary serial port. 3 uart 1 power down a high level on this bit, allows normal operation of the primary serial port (default). a low level on this bit places the primary serial port into power down mode. 4,5 uart 2 address select these bits select the secondary serial port address. 5 4 com port address 0 0 com1 3f8h 0 1 com2 2f8h (default) 1 0 com3 (refer to cr1, bits 5,6) 1 1 com4 (refer to cr1, bits 5,6) 6 uart 2 enable a high level on this bit enables the secondary serial port (default). a low level on this bit disables the secondary serial port. 7 uart 2 power down a high level on this bit, allows normal operation of the secondary serial port (default). a low level on this bit places the secondary serial port into power down mode.
123 cr3 this register can only be accessed when the fdc is in the configuration mode and the csr has been initialized to 03h. the default value after power up is 78h. table 50 - cr3 bit no. bit name description 0 reserved reserved - read as zero 1 enhanced floppy mode 2 bit 1 floppy mode - refer to the description of the tape drive register (tdr) for more information on these modes. 0 normal floppy mode (default) 1 enhanced floppy mode 2 (os2) 3 drive opt 0 these two bits control the drate0 and drate1 outputs. the mapping from the drate sel bit of the dsr, dir and ccr to the drate outputs is shown in table 50 below. defaults 1, 1 after power-up. if bit 1 = 1, then bits 3 and 4 become "don't cares". 4 drive opt 1 5 mfm ident is used in conjunction with mfm to define the interface mode of operation. 6 ident ident 1 1 0 0 mfm 1 0 1 0 mode at mode (default) reserved ps/2 model 30 7,2 adrx/ drv2 en/ pintr bit 7 0 1 1 bit 2 x 0 1 pin 94 input drv2 addrx pintr2 pin 39 pintr pintr high-z adrx output/drive 2 en input: when set to a 1, this bit enables the output. when cleared to a 0 (default) this bit allows the connection of the drive 2 indicator. drive 2 is not available for the fdc37c666gt
124 table 51 - drive option 1 and 2 data rate kb/sec register settings config. register outputs pins drate sel 1 drate sel 0 drive opt 0 drive opt 1 drate1 drate0 1000 1 1 0 0 1 1 500 0 0 0 0 0 0 300 0 1 0 0 0 1 250 1 0 0 0 1 0 1000 1 1 1 0 1 1 500 0 0 1 0 1 0 300 0 1 1 0 0 1 250 1 0 1 0 0 0 x x x 0 1 tbd tbd x x x 1 1 input input
125 cr4 this register can only be accessed when the fdc is in the configuration mode and the csr has been initialized to 04h. the default value after power up is 00h. table 52 - cr4 - parallel and serial extended setup regis ter bit no. bit name description 1,0 parallel port extended modes bit 1 bit 0 if cr1 bit 3 is a low level then: 0 0 standard and bidirectional modes (spp) (default) 0 1 epp mode and spp 1 0 ecp mode (note cr4_2) 1 1 ecp mode & epp mode (note cr4_1, 2) 2,3 parallel port fdc refer to parallel port floppy disk controller description. bit 3 bit 2 0 0 normal 0 1 ppfd1 1 0 ppfd2 1 1 reserved 4 midi 1 serial clock select port 1: a low level on this bit, disables midi support, clock = divide by 13 (default). a high level on this bit enables midi support, clock = divide by 12. (note cr4_3) 5 midi 2 serial clock select port 2: a low level on this bit, disables midi support, clock = divide by 13 (default). a high level on this bit enables midi support, clock = divide by 12. (note cr4_3) 6 epp type 0 = epp 1.9 (default) 1 = epp 1.7 7 resr (this bit is reserved - set/read as '0'). note cr4_1: in this mode, epp can be selected through the ecr register of ecp a s mode 100. note cr4_2: in these modes, 2 drives can be supported directly, 3 or 4 drives must use external 4 drive support! spp can be selected through the ecr register of ecp as mode 000. note cr4_3: midi support: the musical instrumental digital interface (midi) operates at 31.25kbaud (+/-1%) which can be derived from 125khz. (24mhz/12=2mhz, 2mhz/16=125khz).
126 cr5 this register can only be accessed when the fdc is in the configuration mode and the csr has been initialized to 05h. the default value after power up is 00h. table 53 - cr5- floppy disk and ide extended setup register bit no. bit name description 0 fdc secondary a low level on this bit selects the primary address for the fdc interface (default). a high level on this bit selects the secondary address space. 1 ide secondary a low level on this bit selects the primary address for the ide interface (default). a high level on this bit selects the secondary address space. 2 fdc dma mode 0=(default) burst mode is enabled for the fdc fifo execution phase data transfers. 1=non-burst mode enabled. the fdrq and firq pins are strobed once for each byte transferred while the fifo is enabled. 4,3 densel bit 4 bit 3 densel output 0 0 normal (default) 0 1 reserved 1 0 1 1 1 0 5 swap drv 0,1 a high level on this bit, swaps drives and motor sel 0 and 1 of the fdc. a low level on this bit does not (default). 6 extx4 external 4 drive support: 0=internal 4 drive decoder (default). 1=external 4 drive decoder (external 2 to 4 decoder required). 7 ds3 set to 0 (default) - pin 98 is ds2 if ecp is not enabled by the configuration or pdir if ecp is enabled. set to 1 - pin 98 is ds3 regardless of the parallel port mode. address block name notes 3f0-3f7 floppy disk primary address 370-377 floppy disk secondary address 1f0-1f7, 3f6,3f7 ide primary address 170-177, 376,377 ide secondary address
127 cr6 this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 06h. the default value of this register after power up is ffh. this register holds the floppy disk drive types for up to four floppy disk drives. cr7 this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 07h. the default value of this register after power up is 00h. this register holds the value for the floppy boot drive and the polarity of the media id bits. cr8 this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 08h. the default value of this register after power up is 00h. this is the lower 8 bits for the adrx address decode. (note: all addresses are qualified with aen.) cr9 this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 09h. the default value of this register after power up is 00h. this is the upper 3 bits (d2 - msb, d0 - lsb) for the adrx address decode. if ecp mode is not selected then a10 is assumed to be low. (note: all addresses are qualified with aen.) cra this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 0ah. the default value of this register after power up is 00h. this byte defines the fifo threshold for the ecp mode parallel port. crb and crc reserved - the contents of these registers are undefined when read. crd this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 0dh. this register is read only. the default value of this register after power up is 065h for the FDC37C665GT and a 066h for the fdc37c666gt. cre this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 0eh. this register is read only. the default value of this register after power up is 02h. this is used to identify the chip revision level. crf this register can only be accessed when the fdc is in the configuration mode and after the csr has been initialized to 0fh. the default value of this register after power up is 00h.
128 table 54 - crf bit no. bit name description 0 test 0 reserved - set to zero. 1 test 1 reserved - set to zero. 2 test 2 reserved - set to zero. 3 test 3 reserved - set to zero. 4 test 4 reserved - set to zero. 5 test 5 reserved - set to zero. 6 test 6 reserved - set to zero. 7 test 7 reserved - set to zero. fdc37c666gt hardware configuration the fdc37c666gt hardware configuration can select or deselect the parallel, serial, fdc and ide circuits, fdc and ide addresses, set the parallel port and serial port addresses and move the configuration register addresses. pcf1 pcf0 parallel port address 0 0 disabled 0 1 3bch 1 0 378h 1 1 278h ecpen padcf parallel port mode 0 0 printer mode (output only) 0 1 epp 1 0 ecp 1 1 ecp+epp
129 s1cf1 s1cf0 primary serial port address 0 0 disabled 0 1 com3 3e8h 1 0 com2 2f8h 1 1 com1 3f8h s2cf1 s2cf0 secondary serial port address 0 0 disabled 0 1 com4 2e8h 1 0 com1 3f8h 1 1 com2 2f8h idecf ideacf ide control 0 0 disabled 0 1 reserved 1 0 primary 1 1 secondary fdccf facf fdc control 0 0 floppy disabled, configuration registers at 3f0h and 3f1h and allow override of fdc enable/disable and primary/secondary address in config registers. dratex power-up as inputs, allow selection of enhanced floppy mode 2. 0 1 floppy disabled, configuration registers at 370h and 371h and allow override of fdc enable/disable and primary/secondary address in config registers. dratex power-up as inputs, allow selection of enhanced floppy mode 2. 1 0 fdc at primary address (drate0,1 are outputs, enhanced floppy mode 2 not available) 1 1 fdc at secondary address (drate0,1 are outputs, enhanced floppy mode 2 not available)
130 fdc37c666gt software configuration - differences from FDC37C665GT all software configuration options available for the FDC37C665GT are available for the fdc37c666gt except for those options selected by the hardware configuration pins. the options set by hardware configuration in the fdc37c666gt that cannot be changed by software are: parallel port address (set by pcf1, pcf0) parallel port mode (set by ecpen and padcf) serial port address (set by s1cf1, s1cf0, s2cf1, s2cf0) ide control (set by idecf, ideacf) fdc control (if fdccf=1, set by facf, if fdccf=0 can be changed in software configuration) the location of the configuration select registers (csr) can be moved to 370h and the configuration registers 0-f can be accessed at port 371h by setting fdccf=0 and facf=1. to enter the configuration mode of the fdc37c666gt, two writes in succession to the csr (port 3f0h or 370h see fdccf and facf) with 44h data are required. if a write to another address or port occurs between these two writes, the chip does not enter the configuration mode. it is strongly recommended that interrupts be disabled for the duration of these two writes. the configuration mode is exited by writing an aah to the csr. in the fdc37c666gt, the pins used to configure the part should be connected as per the diagram below. this shows how a jumper can be used to set a high (vcc) or a low (gnd) into the port for configuration at the end of the reset pulse. 27k ohms to fdc37c666gt vcc gnd
131 operational description maximum guaranteed ratings * operating temperature range ................................ ................................ ......................... 0 o c to +70 o c storage temperature range ................................ ................................ .......................... -55 o to +150 o c lead temperature range (soldering, 10 seconds) ................................ ................................ .... +325 o c positive voltage on any pin, with respect to ground ................................ ................................ v cc +0.3v negative voltage on any pin, with respect to ground ................................ ................................ .... -0.3v maximum v cc ................................ ................................ ................................ ................................ . +7v *stresses above those listed above could cause permanent damage to the device. this is a stress rating only and functional operation of the device at any other condition above those indicated in the operation sections of this specification is not implied. note: when powering this device from laboratory or system power supplies, it is important that the absolute maximum ratings not be exceeded or device failure can result. some power supplies exhibit voltage spikes on their outputs when the ac power is switched on or off. in addition, voltage transients on the ac power line may appear on the dc output. if this possibility exists, it is suggested that a clamp circuit be used. dc electrical characteristics (t a = 0 c - 70 c, v cc = +5.0 v 10%) parameter symbol min typ max units comments i type input buffer low input level high input level v ili v ihi 2.0 0.8 v v ttl levels is type input buffer low input level high input level schmitt trigger hysteresis v ilis v ihis v hys 2.2 250 0.8 v v mv schmitt trigger schmitt trigger i clk input buffer low input level high input level v ilck v ihck 3.0 0.4 v v input leakage (all i and is buffers except pwrgd) low input leakage high input leakage i il i ih -10 -10 +10 +10 m a m a v in = 0 v in = v cc
132 parameter symbol min typ max units comments input current pwrgd i oh 75 150 m a v in = 0 i/o24 type buffer low output level high output level output leakage v ol v oh i ol 2.4 -10 0.5 +10 v v m a i ol = 24 ma i oh = -12 ma v in = 0 to v cc (note 1) o24 type buffer low output level high output level output leakage v ol v oh i ol 2.4 -10 0.5 +10 v v m a i ol = 24 ma i oh = -12 ma v in = 0 to v cc (note 1) od24 type buffer low output level output leakage v ol i ol -10 0.5 +10 v m a i ol = 24 ma v in = 0 to v cc (note 1) od24p type buffer low output level high output level output leakage v ol v oh i ol 2.4 -10 0.5 +10 v v m a i ol = 24 ma i oh = -30 m a v in = 0 to v cc (note 1) op24 type buffer low output level high output level output leakage v ol v oh i ol 2.4 -10 0.5 +10 v v m a i ol = 24 ma i oh = -4 ma v in = 0 to v cc (note 1) od48 type buffer low output level output leakage v ol i oh -10 0.5 +10 v m a i ol = 48 ma v oh = 0 to v cc (note 2)
133 parameter symbol min typ max units comments o4 type buffer low output level high output level output leakage v ol v oh i ol 2.4 -10 0.4 +10 v v m a i ol = 4 ma i oh = -1 ma v in = 0 to v cc (note 1) o8 type buffer low output level high output level output leakage v ol v oh i ol 2.4 -10 0.4 +10 v v m a i ol = 8 ma i oh = -4 ma v in = 0 to v cc (note 1) supply current active supply current standby i cc i csby 35 300 50 500 ma m a all outputs open. note 3 chiprotect (slct, pe, busy, nack, nerror) i il 10 m a chip in circuit: v cc = 0v v in = 6v max. backdrive (nstrobe, nautofd, ninit,nslctin) i il 10 m a v cc = 0v v in = 6v max. backdrive (pd0-pd7) i il 10 m a v cc = 0v v in = 6v max. note 1: all output leakages are measured with the current pins in high impedance as defined by the pwrgd pin (FDC37C665GT only). note 2: output leakage is measured with the low driving output off, either for a high level output or a high impedance state defined by pwrgd (FDC37C665GT only). note 3: defined by the device configuration with the pwrgd input low. capacitance t a = 25 c; fc = 1mhz; v cc = 5v parameter symbol limits unit test condition min typ max clock input capacitance c in 20 pf all pins except pin under test tied to ac ground input capacitance c in 10 pf output capacitance c out 20 pf
134 timing diagrams parameter min typ max units t1 t2 t3 t4 t5 a0-a9, aen, niocs16 set up to nior low nior width a0-a9, aen, niocs16 hold from nior high data access time from nior low data to float delay from nior high 40 150 10 10 100 60 ns ns ns ns ns t6 parallel port setup t7 read strobe to clear fintr ns 55 ns 20 40 t8 nior or niow inactive for transfers to and from ecp fifo 150 ns t3 t1 t6 t2 t4 t5 t7 t8 t9 data valid a0-a9, aen, niocs16 nior data (d0-d7) pd0-pd7, nerr, pe, nslct, ack, busy fintr nior/niow pintr t9 nior active to pintr inactive 260 ns figure 4 - microprocessor read timing
135 parameter min typ max units t1 t2 t3 t4 t5 a0-a9, aen, niocs16 set up to niow low niow width a0-a9, aen, niocs16 hold from niow high data set up time to niow high data hold time from niow high 40 150 10 10 ns ns ns ns ns 40 t6 write strobe to clear fintr 55 ns 40 t3 t1 t2 t4 t5 t6 t7 data valid a0-a9, aen, niocs16 niow data (d0-d7) fintr pintr t7 niow inactive to pintr inactive 260 ns figure 5 - microprocessor write timing
136 ndack delay time from fdrq high drq reset delay from nior or niow fdrq reset delay from ndack low ndack width nior delay from fdrq high niow delay from fdrq high data access time from nior low data set up time to niow high data to float delay from nior high data hold time from niow high ndack set up to niow/nior low ndack hold after niow/nior high tc pulse width aen set up to nior/niow aen hold from ndack tc active to pdrq inactive parameter min typ max units t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 0 150 0 0 40 10 10 5 10 60 40 10 100 100 100 60 100 ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns ns t15 t2 t3 t12 t16 t1 t4 t5 t6 t11 t14 t8 t7 t9 t10 t13 aen fdrq, pdrq ndack nior or niow data (do-d7) tc data valid figure 6 - dma timing
137 figure 8 - clock timing t1 reset parameter min typ max units t1 reset width 500 ns figure 7 - reset timing t3 t4 t4 clock (clk1) t1 t2 parameter min typ max units t1 t2 t3 t4 clock rise time (vin = 0.4 to 3.0) clock fall time (vin = 3.0 to 0.4) clock period clock active (high or low) 40 14 5 5 ns ns ns ns 41.67
138 t3 t1 t2 t4 t5 t6 t7 t8 t9 t9 ndir nstep nds0-3 nindex nrdata nwdata niow nds0-3, mtr0-3 *x specifies one mclk period and y specifies one wclk period. mclk = controller clock to fdc (see table 6). wclk = 2 x data rate (see table 6). parameter min typ max units t1 t2 t3 t4 t5 t6 t7 t8 t9 ndir set up to nstep low nstep active time low ndir hold time after nstep nstep cycle time nds0-3 hold time from nstep low nindex pulse width nrdata active time low nwdata write data width low nds0-3, mtr0-3 from end of niow x* x* x* x* x* x* ns y* ns 4 24 96 132 20 2 40 .5 25 (at mode timing only) figure 9 - disk drive timing
139 t1 t5 t2 t4 t6 t3 niow nrtsx, ndtrx irqx nctsx, ndsrx, ndcdx irqx niow irqx nior nrix parameter min typ max units t1 t2 t3 t4 t5 t6 nrtsx, ndtrx delay from niow irqx active delay from nctsx, ndsrx, ndcdx irqx inactive delay from nior (leading edge) irqx inactive delay from niow (trailing edge) irqx inactive delay from niow irqx active delay from nrix 10 ns ns ns ns ns ns 200 100 120 125 100 100 figure 10 - serial port timing
140 t1 t2 t3 t9 t10 t4 t5 t6 t7 t11 t8 aen, niocs16 a0-a9 nideenlo, nideenhi, ngamecs, hdcsx ided7 nior db7 db7 niow ided7 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 nideenlo, nideenhi, ngamecs, nhdcsx delay from aen, iocs16 nideenlo, nideenhi, ngamecs, nhdcsx delay from a0-a9 ided7 hold time after nior db7 delay from nior db7 hold time from nior db7 hold time from niow ided7 delay from data bus niow active ided7 inactive delay from niow nideenlo delay from nideenhi, niocs16, aen ided7 set up time before nior ided7 delay from db7, ided7 in output mode parameter min typ max units 10 10 10 10 40 40 40 60 60 50 50 40 25 ns ns ns ns ns ns ns ns ns ns ns figure 11 - ide interface timing
141 t1 t2 t3 t4 t5 pd0-7, ninit, nstrobe, nautofd delay from niow pintr delay from nack, nfault pintr active low in ecp and epp modes pintr delay from nack nerror active to pintr active ns ns ns ns ns 100 60 300 105 105 parameter min typ max units 200 t1 t2 t4 t3 t2 t5 t3 niow ninit, nstrobe. nautofd, slctin nack pintr (spp) pintr (ecp or epp enabled) nfault (ecp) nerror (ecp) pintr t2 t1 t1 pd0-pd7 figure 12 - parallel port timing
142 t18 t9 t8 t17 t12 t19 t10 t11 t13 t20 t22 t2 t1 t5 t3 t14 t16 t4 t6 t15 t7 t21 a0-a10 sd<7:0> niow iochrdy nwrite pd<7:0> ndatast naddrstb nwait pdir t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 niow asserted to pdata valid nwait asserted to nwrite change nwrite to command asserted nwait deasserted to command deasserted nwait asserted to pdata invalid time out command deasserted to nwait asserted sdata valid to niow asserted niow deasserted to data invalid niow asserted to iochrdy asserted nwait deasserted to iochrdy deasserted iochrdy deasserted to niow deasserted niow asserted to nwrite asserted nwait asserted to command asserted command asserted to nwait deasserted pdata valid to command asserted ax valid to niow asserted niow deasserted to ax invalid niow deasserted to niow or nior asserted nwait asserted to nwrite asserted nwait asserted to pdir low pdir low to nwrite asserted ns ns ns ns ns s ns ns ns ns ns ns ns ns s ns ns ns ns ns ns ns 50 185 35 190 12 24 160 70 210 10 185 parameter min max units 0 60 5 60 0 10 0 10 0 0 60 10 0 60 0 10 40 10 40 60 0 0 notes 1 1 1 1 1 1 1. wait must be filtered to compensate for ringing on the parallel bus cable. wait is considered to have settled after it does not transition for a minimum of 50 nsec. figure 13 - epp 1.9 data or address write cycle
143 t20 t19 t11 t22 t13 t12 t8 t10 t18 t23 t24 t27 t9 t21 t17 t2 t25 t5 t4 t16 t1 t14 t26 t28 t3 t7 t15 t6 pdata bus driven by peripheral a0-a10 ior sd<7:0> iochrdy pdir nwrite pd<7:0> datastb addrstb nwait timing parameter table for the epp data or address read cycle is found on page 144. figure 14a - epp 1.9 data or address read cycle
144 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 t18 t19 t20 t21 t22 t23 t24 t25 t26 t27 t28 pdata hi-z to command asserted nior asserted to pdata hi-z nwait deasserted to command deasserted command deasserted to pdata hi-z command asserted to pdata valid pdata hi-z to nwait deasserted pdata valid to nwait deasserted nior assertd to iochrdy asserted nwrite deasserted to nior asserted nwait deasserted to iochrdy deasserted iochrdy deasserted to nior deasserted nior deasserted to sdata hi-z (hold time) pdata valid to sdata valid nwait asserted to command asserted time out nwait deasserted to pdata driven nwait deasserted to nwrite modified sdata valid to iochrdy deasserted ax valid to nior asserted nior deasserted to ax invalid nwait asserted to nwrite deasserted nior deasserted to niow or nior asserted nwait asserted to pdir set pdata hi-z to pdir set nwait asserted to pdata hi-z pdir set to command nwait deasserted to pdir low nwrite deasserted to command ns ns ns ns ns s ns ns ns ns ns ns ns ns s ns ns ns ns ns ns ns ns ns ns ns ns ns 30 50 180 24 160 40 75 195 12 190 190 85 10 185 185 180 20 180 parameter min max units 0 0 60 0 0 0 0 0 0 60 0 0 0 0 10 60 60 0 40 10 0 40 60 0 60 0 60 1 notes 1 2 1 1 1,2 3 1 1 1 1. nwait is considered to have settled after it does not transition for a minimum of 50 ns. 2. when not executing a write cycle, epp nwrite is inactive high. 3. 85 is true only if t7 = 0. figure 14b - epp 1.9 data or address read cycle timing parameters
145 t18 t9 t8 t17 t6 t12 t19 t10 t20 t11 t13 t2 t1 t5 t3 t16 t4 t21 a0-a10 sd<7:0> niow iochrdy nwrite pd<7:0> ndatast naddrstb nwait pdir niow asserted to pdata valid command dessserted to nwrite change nwrite to command niow deasserted to command deasserted command deasserted to pdata invalid time out sdata valid to niow asserted niow deasserted to data invalid niow asserted to iochrdy asserted nwait deasserted to iochrdy deasserted iochrdy deasserted to niow deasserted niow asserted to nwrite asserted pdata valid to command asserted ax valid to niow asserted niow deasserted to ax invalid niow deasserted to niow or nior asserted nwait asserted to iochrdy deasserted command deasserted to nwait deasserted ns ns ns ns ns s ns ns ns ns ns ns ns ns s ns ns ns 50 40 35 50 12 24 40 50 35 45 parameter min max units 0 0 5 50 10 10 0 0 10 0 10 40 10 100 0 notes 2 1. write is controlled by clearing the pdir bit to "0" in the control register before performing an epp write. 2. this number is only valid if wait is active when iow goes active. t1 t2 t3 t4 t5 t6 t8 t9 t10 t11 t12 t13 t16 t17 t18 t19 t20 t21 figure 15 - epp 1.7 data or address write cycle
146 t20 t19 t11 t15 t22 t13 t12 t3 t8 t10 t5 t4 t23 t2 t21 a0-a10 nior sd<7:0> iochrdy nwrite pd<7:0> ndatastb naddrstb nwait pdir t2 t3 t4 t5 t8 t10 t11 t12 t13 t15 t19 t20 t21 t22 t23 nior deasserted to command deasserted nwait asserted to iochrdy deasserted command deasserted to pdata hi-z command asserted to pdata valid nior asserted to iochrdy asserted nwait deasserted to iochrdy deasserted iochrdy deasserted to nior deasserted nior deasserted to sdata high-z (hold time) pdata valid to sdata valid time out ax valid to nior asserted nior deasserted to ax invalid command deasserted to nwait deasserted nior deasserted to niow or nior asserted nior asserted to command asserted ns ns ns ns ns ns ns ns ns s ns ns ns ns ns 50 40 24 50 40 40 12 55 parameter min max units 0 0 0 0 0 10 40 10 0 40 notes 1. write is controlled by setting the pdir bit to "1" in the control register before performing an epp read. figure 16 - epp 1.7 data or address read cycle
147 ecp parallel port timing parallel port fifo (mode 101) the standard parallel port is run at or near the peak 500kbytes/sec allowed in the forward direction using dma. the state machine does not examine nack and begins the next transfer based on busy. refer to figure 17. ecp parallel port timing the timing is designed to allow operation at approximately 2.0mbytes/sec over a 15ft cable. if a shorter cable is used then the bandwidth will increase. forward-idle when the host has no data to send it keeps hostclk (nstrobe) high and the peripheral will leave periphclk (busy) low. forward data transfer phase the interface transfers data and commands from the host to the peripheral using an interlocked periphack and hostclk. the peripheral may indicate its desire to send data to the host by asserting nperiphrequest. the forward data transfer phase may be entered from the forward-idle phase. while in the forward phase the peripheral may asynchronously assert the nperiphrequest (nfault) to request that the channel be reversed. when the peripheral is not busy it sets periphack (busy) low. the host then sets hostclk (nstrobe) low when it is prepared to send data. the data must be stable for the specified setup time prior to the falling edge of hostclk. the peripheral then sets periphack (busy) high to acknowledge the handshake. the host then sets hostclk (nstrobe) high. the peripheral then accepts the data and sets periphack (busy) low, completing the transfer. this sequence is shown in figure 18. the timing is designed to provide 3 cable round -trip times for data setup if data is driven simultaneously with hostclk (nstrobe). reverse -idle phase the peripheral has no data to send and keeps periphclk high. the host is idle and keeps hostack low. reverse data transfer phase the interface transfers data and commands from the peripheral to the host using an interlocked hostack and periphclk. the reverse data transfer phase may be entered from the reverse-idle phase. after the previous byte has beed accepted the host sets hostack (nautofd) low. the peripheral then sets periphclk (nack) low when it has data to send. the data must be stable for the specified setup time prior to the falling edge of periphclk. when the host is ready it to accept a byte it sets. hostack (nautofd) high to acknowledge the handshake. the peripheral then sets periphclk (nack) high. after the host has accepted the data it sets hostack (nautofd) low, completing the transfer. this sequence is shown in figure 19. output drivers to facilitate higher performance data transfer, the use of balanced cmos active drivers for critical signals (data, hostack, hostclk, periphack, periphclk) are used ecp mode. because the use of active drivers can present compatibility problems in compatible mode (the control signals, by tradition, are specified as
148 open -collector), the drivers are dynamically changed from open -collector to totem -pole. the timing for the dynamic driver change is specified in the ieee 1284 extended capabilities port protocol and isa interface standard , rev. 1.09, jan. 7, 1993, available from microsoft. the dynamic driver change must be implemented properly to prevent glitching the outputs. t3 t6 t1 t2 t5 t4 pdata nstrobe busy parameter min max units t1 t2 t3 t4 t5 t6 data valid to nstrobe active nstrobe active pulse width data hold from nstrobe inactive nstrobe active to busy active busy inactive to nstrobe active busy inactive to pdate invalid 600 600 450 680 80 ns ns ns ns ns ns 500 notes 1 1 1. the data is held until busy goes inactive or for time t3, whichever is longer. this only applies if another data transfer is pending. if no other data transfer is pending, the data is held indefinitely. figure 17 - parallel port fifo timing
149 parameter min max units t1 t2 t3 t4 t5 t6 t7 t8 nautofd valid to nstrobe asserted pdata valid to nstrobe asserted busy deasserted to nautofd changed busy deasserted to pdata changed nstrobe asserted to busy asserted nstrobe deasserted to busy deasserted busy deasserted to nstrobe asserted busy asserted to nstrobe deasserted 0 0 80 80 0 0 80 80 ns ns ns ns ns ns ns ns 60 60 180 180 200 180 notes 1,2 1,2 1,2 2 1. maximum value only applies if there is data in the fifo waiting to be written out. 2. busy is not considered asserted or deasserted until it is stable for a minimum of 75 to 130 ns. t3 t4 t1 t2 t7 t8 t6 t5 t6 nautofd pdata<7:0> nstrobe busy figure 18 - ecp parallel port forward timing
150 t2 t1 t5 t6 t4 t3 t4 pdata<7:0> nack nautofd parameter min max units t1 t2 t3 t4 t5 t6 pdata valid to nack asserted nautofd deasserted to pdata changed nack asserted to nautofd deasserted nack deasserted to nautofd asserted nautofd asserted to nack asserted nautofd deasserted to nack deasserted 0 0 80 80 0 0 ns ns ns ns ns ns 200 200 notes 1,2 2 1. maximum value only applies if there is room in the fifo and a terminal count has not been received. ecp can stall by keeping nautofd low. 2. nack is not considered asserted or deasserted until it is stable for a minimum of 75 to 130 ns. figure 19 - ecp parallel port reverse timing
151 0.10 -c- h a a1 a2 td/te 0 l1 l e1 e d1 d e w dim a a1 a2 d d1 e e1 h l l1 e 0 w td(1) te(1) td(2) te(2) min 2.80 0.1 2.57 23.4 19.9 17.4 13.9 0.1 0.65 1.8 max 3.15 0.45 2.87 24.15 20.1 18.15 14.1 0.2 0.95 2.6 min .110 .004 .101 .921 .783 .685 .547 .004 .026 .071 max .124 .018 .113 .951 .791 .715 .555 .008 .037 .102 0 .2 21.8 15.8 22.21 16.27 12 .4 22.2 16.2 22.76 16.82 0.65 bsc 0 .008 .858 .622 .874 .641 12 .016 .874 .638 .896 .662 .0256 bsc notes: 1) coplanarity is 0.100mm (.004") maximum. 2) tolerance on the position of the leads is 0.200mm (.008") maximum. 3) package body dimensions d1 and e1 do not include the mold protrusion. maximum mold protrusion is 0.25mm (.010"). 4) dimensions td and te are important for testing by robotic handler. only above combinations of (1) or (2) are acceptable. 5) controlling dimension: millimeter. dimensions in inches for reference only and not necessarily accurate. millimeters inches figure 20 - 100 pin qfp
standard microsys tems corp. circuit diagrams utilizing smsc products are included as a means of illustrating typical applications; consequently complete information sufficient for construction purposes is not necessarily given. the information has been carefully checked and is believed to be entirely reliable. however, no responsibility is assumed for inaccuracies. furthermore, such information does not convey to the purchaser of the semiconduc tor devices described any licenses under the patent rights of smsc or others. smsc reserves the right to make changes at any time in order to improve design and supply the best product possible. smsc products are not designed, intended, authorized or warranted for use in any life support or other application where product failure could cause or contribute to personal injury or severe property damage. any and all such uses without prior written approval of an officer of smsc and further testing and/or modification will be fully at the risk of the customer. FDC37C665GT/fdc37c666gt rev. 11/28/94


▲Up To Search▲   

 
Price & Availability of FDC37C665GT

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X